An open API service indexing awesome lists of open source software.

https://github.com/siongui/pelican-code

Pelican plugin to include source code file in your post by reStructuredText directive.
https://github.com/siongui/pelican-code

pelican pelican-plugins restructuredtext

Last synced: 8 months ago
JSON representation

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

Awesome Lists containing this project

README

          

=============================================
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-block:: rst

.. 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 `_