A MkDocs plugin that injects the mkdocs.yml extra variables into the markdown template
Project description
# mkdocs-markdownextradata-plugin
*A MkDocs plugin that injects the mkdocs.yml extra variables into the markdown template*
**usecase**
```
As a user with variables that need to be inserted at the markdown level, not the template level.
I need a mkdocs plugin that will inject my `extras` variables into the markdown template before it gets rendered to html.
So that I can build my markdown pages with different values for images, urls, client_names, etc.
```
<br/>
## Installation
> **Note:** This package requires MkDocs version 0.17 or higher.
Install the package with pip:
```bash
pip install mkdocs-markdownextra-plugin
```
Enable the plugin in your `mkdocs.yml`:
```yaml
plugins:
- search
- markdownextra
```
> **Note:** If you have no `plugins` entry in your config file yet, you'll likely also want to add the `search` plugin. MkDocs enables it by default if there is no `plugins` entry set, but now you have to enable it explicitly.
More information about plugins in the [MkDocs documentation][mkdocs-plugins]
<br/>
## Features
### Use Extra Variables in your markdown files
The variables you define in the mkdown.yml `extra:` slot will become available in your templates
```yaml
extra:
customer:
name: Your name here
web: www.example.com
salt: salt.example.com
```
and then in your `*.md` files
```jinja
{{ customer.name }}
<a href="{{ customer.web }}">{{ customer.web }}</a>
```
<br/>
## Contributing
From reporting a bug to submitting a pull request: every contribution is appreciated and welcome.
Report bugs, ask questions and request features using [Github issues][github-issues].
If you want to contribute to the code of this project, please read the [Contribution Guidelines][contributing].
[travis-status]: https://travis-ci.org/rosscdh/mkdocs-markdownextradata-plugin.svg?branch=master
[travis-link]: https://travis-ci.org/rosscdh/mkdocs-markdownextradata-plugin
[mkdocs-plugins]: http://www.mkdocs.org/user-guide/plugins/
[github-issues]: https://github.com/rosscdh/mkdocs-markdownextradata-plugin/issues
[contributing]: CONTRIBUTING.md
*A MkDocs plugin that injects the mkdocs.yml extra variables into the markdown template*
**usecase**
```
As a user with variables that need to be inserted at the markdown level, not the template level.
I need a mkdocs plugin that will inject my `extras` variables into the markdown template before it gets rendered to html.
So that I can build my markdown pages with different values for images, urls, client_names, etc.
```
<br/>
## Installation
> **Note:** This package requires MkDocs version 0.17 or higher.
Install the package with pip:
```bash
pip install mkdocs-markdownextra-plugin
```
Enable the plugin in your `mkdocs.yml`:
```yaml
plugins:
- search
- markdownextra
```
> **Note:** If you have no `plugins` entry in your config file yet, you'll likely also want to add the `search` plugin. MkDocs enables it by default if there is no `plugins` entry set, but now you have to enable it explicitly.
More information about plugins in the [MkDocs documentation][mkdocs-plugins]
<br/>
## Features
### Use Extra Variables in your markdown files
The variables you define in the mkdown.yml `extra:` slot will become available in your templates
```yaml
extra:
customer:
name: Your name here
web: www.example.com
salt: salt.example.com
```
and then in your `*.md` files
```jinja
{{ customer.name }}
<a href="{{ customer.web }}">{{ customer.web }}</a>
```
<br/>
## Contributing
From reporting a bug to submitting a pull request: every contribution is appreciated and welcome.
Report bugs, ask questions and request features using [Github issues][github-issues].
If you want to contribute to the code of this project, please read the [Contribution Guidelines][contributing].
[travis-status]: https://travis-ci.org/rosscdh/mkdocs-markdownextradata-plugin.svg?branch=master
[travis-link]: https://travis-ci.org/rosscdh/mkdocs-markdownextradata-plugin
[mkdocs-plugins]: http://www.mkdocs.org/user-guide/plugins/
[github-issues]: https://github.com/rosscdh/mkdocs-markdownextradata-plugin/issues
[contributing]: CONTRIBUTING.md
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 mkdocs-markdownextradata-plugin-0.0.3.tar.gz
.
File metadata
- Download URL: mkdocs-markdownextradata-plugin-0.0.3.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aace9a5bb15d3cee288e6521cb629d19baea5c0c7fca4f6ddddd0c28fba5e7a1 |
|
MD5 | 61649f355e583a9b52e6935ed595983f |
|
BLAKE2b-256 | 45c448ded3c37b45d08dc747892ae00eb8307b0d1c6c03f707a1f17613a57112 |
Provenance
File details
Details for the file mkdocs_markdownextradata_plugin-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: mkdocs_markdownextradata_plugin-0.0.3-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1822484f190e381bdf70d316c4daf2ee7630a100d276abdb1deb9b39001fee5b |
|
MD5 | cc01e718f65a5f5c04253889e21c5407 |
|
BLAKE2b-256 | e4b99d6d215c5354bc579cd3157b72baafc9355c33496f07342b1e44c83384b7 |