Easily embed Github files in your Pelican articles.
Project description
Pelican Git is a library that makes it easy to embed GitHub files in your Pelican blogs using simple syntax.
Installation
To install pelican-git, simply:
$ pip install pelican-git
Then add a bit of code to your blog configuration:
PLUGINS = [
# ...
'pelican_git',
# ...
]
Usage
In your articles, just add lines to your posts that look like:
[git:repo=yourname/yourrepo,file=somefile,branch=master,hash=xxxxxxx]
branch and hash are optional. If you don’t specify branch, it will be master. If you specify hash it will overwrite the branch setting.
The generated code will embed css and html content directly into a div and replace the original tag. This is faster and cleaner than using javascript to rewrite the page content like what gist_it does.
Settings
GIT_CACHE_ENABLED - Specifies whether to cache the git files on disk or not. Default is False. (Optional)
Testing
$ make install
$ make test
Changelog
0.1.0 - Initial version
License
Uses the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pelican_git-0.1.9-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 603e324dce532921b3e447f1fc8229331c1b8e9c4eae4a9881cc2ca4e809c59c |
|
MD5 | b324a7e4b13caec91ba64bed5c415ca5 |
|
BLAKE2b-256 | e1ec35e4e796334e00f92a78c6b5fb882ee8d8cdeff8ad48241473140641efb2 |