Mkdocs plugin that allow to inject snippet or all markdown content from a given remote git repository.
Project description
# About
MkDocs plugin that allow to inject snippet or all markdown content from a given remote git repository. The goal is to show different markdowns from different projects inside a MkDocs, you put together all info across some projects.
## Installation
Install the package with pip:
`bash pip install mkdocs-gitsnippet-plugin `
## Configuration
Enable the plugin in your mkdocs.yml if you didn’t change the folder name that contain your documentation source files. By default docs.
`yaml plugins: - gitsnippet `
Enable the plugin in your mkdocs.yml if you changed the folder name that contain your documentation source files. By default docs.
`yaml plugins: - gitsnippet: base_path: docs `
> This package requires MkDocs version 0.17 or higher.
## Usage
mkdocs-gitsnippet-plugin will download the file you specify from a remote git repository, extract the section or all content and inject that into you MkDocs file at render time.
### Snippet a section
If you want to extract a section from a remote git repository, you can add the following to your markdown in MkDocs:
`markdown {{ gitsnippet('git@github.com:SamazoOo/mkdocs-gitsnippet-plugin.git', 'README.md', '## Installation') }} ` ### All markdown content
If you want to get all context from a markdown in a remote git repository, you can add the following to your markdown in MkDocs:
`markdown {{ gitsnippet('git@github.com:SamazoOo/mkdocs-gitsnippet-plugin.git', 'README.md', '') }} `
### Images references
If the remote file has references to images, those will also be downloaded and placed in a _gen folder in the mkdocs hierarchy. You will probably want to include **/gen_ in your .gitignore file so you don’t put those into your git repository unless you want them there.
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 mkdocs-gitsnippet-plugin-1.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5a91b517a9d60656f745fc869e28edae74f1dbed81e2995dccec0c2e3777fd1 |
|
MD5 | 0b1635a7dd7112934702f11c4497a2c5 |
|
BLAKE2b-256 | cf3e002c30eee449d243f21d14741112185b0edde8f139a34b3f648f296a0f45 |
Hashes for mkdocs_gitsnippet_plugin-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85f99f8d0db18484c5c1bb160fabc5e19bc2a1264369a5b5d160009d6d427234 |
|
MD5 | 08a51e239e4e7ebe873f00fa9a68833b |
|
BLAKE2b-256 | fb8da5e969edb576f0b5cbe75ecc8c73e2c45c41b6c4b5194aadf5072150ee2b |