Skip to content

siongui/pelican-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Pelican Plugin for Including Source Code File

Pelican plugin to include source code file in your post by reStructuredText directive.

Installation

Follow the instructions in official Pelican documentation.

Usage

Use the following reStructuredText directive in your post:

.. code-file:: {{ filename }}
    :encoding: (optional)
    :tab-width: (optional)
    :start-line: (optional)
    :end-line: (optional)
    :start-after: (optional)
    :end-before: (optional)
    :class: (optional)
    :name: (optional)

The source code file must be put in the same directory of your post. The only necessary argument is {{ filename }}. For details descriptions of options, please see the options of Including an External Document Fragment (This directive is derived from it.).

UNLICENSE

This plugin is released in public domain. See UNLICENSE.

References

  1. Including an External Document Fragment
  2. source code of "Including an External Document Fragment"
  3. Creating reStructuredText Directives
  4. Introduction and Quickstart - Pygments

About

Pelican plugin to include source code file in your post by reStructuredText directive.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages