Skip to main content

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

mkdocs_statblock_plugin-0.1.2.tar.gz (5.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page