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 use pip:
$ pip install pelican-git
Then add a bit of code to your pelican configuration file:
PLUGINS = [
# ...
'pelican_git',
# ...
]
Usage
In your articles, 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.13
Fixed
Fixed error when fetching github HTML
Changed
Support Python 3.6
0.1.8
Fixed
Fix link to original repo
0.1.0
dded
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
File details
Details for the file pelican-git-0.1.13.tar.gz
.
File metadata
- Download URL: pelican-git-0.1.13.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23f4fe96b0a5c6e5238d2f3d7e69162de07dff4adc0c3748dd5af7cf4bbc5bdb |
|
MD5 | 30d9686f9bd6f1ed54c9e5fc229caf05 |
|
BLAKE2b-256 | b0d6259525efe9b075324cd96a65f24fc3d36a09606ca4af0813b5985397bd84 |
File details
Details for the file pelican_git-0.1.13-py2.py3-none-any.whl
.
File metadata
- Download URL: pelican_git-0.1.13-py2.py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07ba633f521c9376c9b4a849b8d601d807606da3bd5a7b041789bb5ed6328e2e |
|
MD5 | e968c5cf4c541b8b55c27a6862f0de66 |
|
BLAKE2b-256 | c22cabc39ed8946b0b166f11c1d068440a05c7820a28bf652afde8b4c82b6141 |