# 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. It’s possible to specify brunch of repository
### 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', '') }} `
### All markdown content and specify the name of the branch
If you want to get all context from a markdown in a remote git repository and get it from development brunch, you can add the following to your markdown in MkDocs:
`markdown {{ gitsnippet('git@github.com:SamazoOo/mkdocs-gitsnippet-plugin.git', 'README.md', '', 'development') }} `
### 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.
Metadata
Release files for mkdocs-gitsnippet-plugin 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mkdocs-gitsnippet-plugin-1.2.0.tar.gz | 3.6 kB | Without provenance | Details for mkdocs-gitsnippet-plugin-1.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mkdocs_gitsnippet_plugin-1.2.0-py3-none-any.whl | Python 3 | none | any | Details for mkdocs_gitsnippet_plugin-1.2.0-py3-none-any.whl |
Total release size: 8.3 kB
Release files / mkdocs-gitsnippet-plugin-1.2.0.tar.gz
| Download URL | mkdocs-gitsnippet-plugin-1.2.0.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f1f653629407515a83ce2c2213a2342649f11c795fb468edd8c85625bdb6cd93
|
|
BLAKE2b-256 checksum How to use checksums |
21c2d4d1d5d765b8dd100dbab4b566d3063a26d63793fa31d6c4ce23ad592b36
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0
|
Release files / mkdocs_gitsnippet_plugin-1.2.0-py3-none-any.whl
| Download URL | mkdocs_gitsnippet_plugin-1.2.0-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3f3a0eb4d70bc7d51f6b3803be4e6b6014a84546e231223cb9cd02bfb8d2d79e
|
|
BLAKE2b-256 checksum How to use checksums |
113f51b966d14ab0a84c164c2cb6850160a6290e4fd434d7599e6d64b02b44e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0
|
Security for mkdocs-gitsnippet-plugin 1.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.