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.
- Host: GitHub
- URL: https://github.com/siongui/pelican-code
- Owner: siongui
- Created: 2013-11-17T02:08:18.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-11-17T02:10:11.000Z (over 12 years ago)
- Last Synced: 2025-02-10T00:51:11.940Z (over 1 year ago)
- Topics: pelican, pelican-plugins, restructuredtext
- Language: Python
- Size: 102 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
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 `_