Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ntno/mkdocs-macros-test
ARCHIVED - Implementation of a (model) pluglet for mkdocs-macros
https://github.com/ntno/mkdocs-macros-test
Last synced: 4 months ago
JSON representation
ARCHIVED - Implementation of a (model) pluglet for mkdocs-macros
- Host: GitHub
- URL: https://github.com/ntno/mkdocs-macros-test
- Owner: ntno
- License: mit
- Archived: true
- Fork: true (fralau/mkdocs-macros-test)
- Created: 2023-01-17T00:50:37.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-03T17:16:12.000Z (almost 2 years ago)
- Last Synced: 2024-09-12T02:06:43.735Z (4 months ago)
- Language: Shell
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Archived - see pluglet in [mkdocs-terminal](https://github.com/ntno/mkdocs-terminal)
# Test pluglet for mkdocs-macros
## What it is
This is a test **pluglet** for mkdocs-macros.
Its purpose is to serve as a template
for pluglets.It exports three macros, which can be used in markdown pages, and aren't particularly
interesting:- `test_fn(x:float)`: an arithmetic expression.
- `say_hello(s:str)`: displays Hello followed by the string, in italics.
- `test_fn2(s:str)`: same as `say_hello()`but does it slightly differentlyFor example, you could write:
He said {{ say_hello('Joe') }}.
Which will be translated into HTML as:
He said Hello Joe
## How to install it
Directly from pypi:
`pip install mkdocs-macros-test`Or directly from the github repository: download
the package and run:
`python setup.py install`## How to call it from an MkDocs project
In the config (`mkdocs.yml`) file:
```yaml
plugins:
- search
- macros:
modules: ['mkdocs_test`]
```### Notes
https://github.com/fralau/mkdocs_macros_plugin
question - can this plugin be used to change the jinja2 environment that mkdocs uses?use case:
i would like to be able to install a jinja2 extension and then use that extension in my custom mkdocs themein particular:
https://github.com/danielchatfield/jinja2_markdownhttps://github.com/fralau/mkdocs_macros_plugin/blob/master/mkdocs_macros/plugin.py#L583