MkDocs plugin to format YAML within statblock superfences as HTML
Project description
mkdocs statblock plugin
This mkdocs plugin scans your files for statblock
code blocks and renders them as statblocks. Right now, it only supports Pathfinder 1e statblocks. The statblock code blocks are formatted as yaml.
Installation
Configuration
Add the following lines to your mkdocs.yml
:
plugins:
- statblocks
By default the plugin scans all files in your docs_dir
(docs
by default) for statblocks (files with .yaml
extension). You can override the root folder of your bestiary by adding the following configuration:
plugins:
- statblocks:
- bestiary: bestiary/
The bestiary folder is relative to the docs_dir
. For example:
- docs/
- bestiary/
- goblin.yaml
- orc.yaml
- my cool file.md
mkdocs.yml
You can get most official Pathfinder 1e statblocks from Pathfinder1 Statblocks.
Usage
The most basic usage is saving a statblock as .yaml
-file under the bestiary folder, and referencing it in your markdown file like this:
# My Monster
```statblock
monster: My Monster
```
This will search for a my-monster.yaml
file in your bestiary folder, extract its contents and render the statblock.
If you want to override some values, you can do so by adding them to the code block. Check the existing .yaml
-file for how specify the values. The order of the properties does not matter - it will always override the base monster with your custom definition.
# My Monster
```statblock
monster: My Monster
Name: My Custom Monster
CR: 20
Melee: null # erase the base monster's Melee definition
```
Of course you can design a monster from scratch, by omitting the monster
property.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for mkdocs_statblock_plugin-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52f2aa11956ca6e4d61143eefac66c98d92bd640ee40d5a96a3f7567fa95b5cf |
|
MD5 | 7887c7616e052531919b40debc3e598f |
|
BLAKE2b-256 | 198c47cd3a38e8748910c4eed55998a41147de290ef6cfe202aec7e8a6c80a35 |