Implementation of the Torillic theme for mkdocs. Convert your markdown TTRPG notes into beautiful HTML!
Project description
Torillic
Magic is distilled laziness
This theme, named after the fantasy setting of Dungeons & Dragons, is designed with tabletop RPG players in mind. The theme allows beautiful HTML exports designed to look like a professionally made tabletop resource, whilst remaining easy to edit in code view and in small windows, thanks to CSS media queries.
Installing
The easiest way to install mkdocs-torillic is via PyPi - in a command line terminal with pip installed, just run:
pip install mkdocs-torillic
Alternatively, you can clone/download this repo and either store it in your Python path or use pip install <path to your local folder>. If you do so, just remember to use the last-release branch rather than main - the base theme is copied over from here when a release is built, so in the main (development) branch there's just a file called torillic.stub in its place.
Theme configuration
Torillic accepts the following theme configuration options in the mkdocs.yaml file:
background_image
Supply either a file path or a web link to an image to use for the site's background. If not supplied, will use the defaut Torillic background (wood planks).
favicon
Supply either a file path or a web link to an image to use for this site's favicon (the image on the tab in your browser). By default, will use the Torillic logo (wireframe of a D20).
Plugins
Installing mkdocs-torillic now adds optional plugins to mkdocs:
torillic-statblock
Recognises any code blocks whose language is statblock as a statblock and styles it as an expandable panel. You can also add the name of the game system after the word statblock (separated by a :) to alter the label created (e.g. statblock:5e will create an expandable stat block labelled "Statblock (5e)"). As with other elements, you can use {.full-width} to create a full-width statblock with columns inside, rather than sitting in a column.
For example, here's a statblock for a Kobold in D&D 5e:
\```statblock:5e
### Kobold
*Small Humanoid (Kobold), Lawful Evil*
---
**Armor Class** 12
**Hit Points** 5 (2d6 - 2)
**Speed** 30 ft.
---
| STR | DEX | CON | INT | WIS | CHA |
|------|------|------|------|------|------|
| 7 | 15 | 9 | 8 | 7 | 8 |
| (-2) | (+2) | (-1) | (-1) | (-2) | (-1) |
---
**Senses** [Darkvision](https://www.dndbeyond.com/compendium/rules/basic-rules/monsters#Darkvision) 60 ft., Passive Perception 8
**Languages** Common, Draconic
**Challenge** 1/8 (25 XP)
---
***Sunlight Sensitivity.*** While in sunlight, the kobold has disadvantage on attack rolls, as well as on Wisdom ([Perception](https://www.dndbeyond.com/compendium/rules/basic-rules/using-ability-scores#Perception)) checks that rely on sight.
***Pack Tactics.*** The kobold has advantage on an attack roll against a creature if at least one of the kobold's allies is within 5 feet of the creature and the ally isn't [incapacitated](https://www.dndbeyond.com/compendium/rules/basic-rules/appendix-a-conditions#Incapacitated).
#### Actions
***Dagger.** Melee Weapon Attack:* +4 to hit, reach 5 ft., one target. *Hit:* 4 (1d4 + 2) piercing damage.
***Sling.** Ranged Weapon Attack:* +4 to hit, range 30/120 ft., one target. *Hit:* 4 (1d4 + 2) bludgeoning damage.
\```
torillic-ipa
Recognises content inbetween two / as International Phonetic Alphabet (IPA) and adds a link to it in IPA Reader, making it super easy to add pronunciation guides in your notes.
For example, if you wanted to add a pronunciation guide for the word Torillic, you would do:
/tɔrɪlɪk/
Page configuration
Torillic accepts the following configuration options from an individual page's yaml frontmatter:
contents
Whether to include a contents block and, if so, what kind. Options are:
global: Include a "global" contents block, i.e. one which describes the entire sitelocal: Include a local contents block, i.e. one which describes the current page's children / siblingsnone: Do not include a contents block
If not supplied, the site homepage will have global contents block and section home pages will have a local contents block, other pages will not include a contents block.
Tips & Tricks
- Using
> blockquoteswill create a green box like the ones used in 5e stat blocks - In full page view, content is arranged into two columns - however,
# heading 1and# heading 2elements span both columns so can be used as separators. A blank top-level heading will still split the page. - The heading with a yellow line underneath (you know the one) is
#### heading 4 - Actions in 5e stat blocks are generally formatted like so:
***Name.*** *Attack Type:* +[modifier] to hit, reach [reach] ft., [n targets] target(s). *Hit:* [approx damage] ([n dice]d[die size] + [additional]) [damage type] damage.
- For an example of a full stat sheet in Torillic, check out the markdown below the screenshots.
- Ultimately, it's yours to play with, so feel free to completely ignore this advice and lay things out however works for your campaign!
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mkdocs_torillic-2.4.1.tar.gz.
File metadata
- Download URL: mkdocs_torillic-2.4.1.tar.gz
- Upload date:
- Size: 6.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8940ef0b781b4f3d8e6ae2fa0e99b2f295635ce387dd44586c0b85771668313c
|
|
| MD5 |
157215d004962a44d8a50f462ba9f647
|
|
| BLAKE2b-256 |
295f4ea21cbeb5c9a87ab61f0d0df7fd082d1570645377632fcc79be22631352
|
Provenance
The following attestation bundles were made for mkdocs_torillic-2.4.1.tar.gz:
Publisher:
build.yml on TEParsons/mkdocs-torillic
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mkdocs_torillic-2.4.1.tar.gz -
Subject digest:
8940ef0b781b4f3d8e6ae2fa0e99b2f295635ce387dd44586c0b85771668313c - Sigstore transparency entry: 200271691
- Sigstore integration time:
-
Permalink:
TEParsons/mkdocs-torillic@515f086dcd4cced39e8536bbe3b8764d1caf2acf -
Branch / Tag:
refs/tags/2.4.1 - Owner: https://github.com/TEParsons
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@515f086dcd4cced39e8536bbe3b8764d1caf2acf -
Trigger Event:
push
-
Statement type:
File details
Details for the file mkdocs_torillic-2.4.1-py3-none-any.whl.
File metadata
- Download URL: mkdocs_torillic-2.4.1-py3-none-any.whl
- Upload date:
- Size: 6.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc60c17625792252c72ef42f487097ffe1177c7bb28cf026fee6fc5a180a0036
|
|
| MD5 |
f063d9aa76b5261103db637382a4c3bc
|
|
| BLAKE2b-256 |
7edc10deb4559238c531c573ee9cd9259d95c89af724918ab1b4ce1e51a1232b
|
Provenance
The following attestation bundles were made for mkdocs_torillic-2.4.1-py3-none-any.whl:
Publisher:
build.yml on TEParsons/mkdocs-torillic
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mkdocs_torillic-2.4.1-py3-none-any.whl -
Subject digest:
bc60c17625792252c72ef42f487097ffe1177c7bb28cf026fee6fc5a180a0036 - Sigstore transparency entry: 200271694
- Sigstore integration time:
-
Permalink:
TEParsons/mkdocs-torillic@515f086dcd4cced39e8536bbe3b8764d1caf2acf -
Branch / Tag:
refs/tags/2.4.1 - Owner: https://github.com/TEParsons
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@515f086dcd4cced39e8536bbe3b8764d1caf2acf -
Trigger Event:
push
-
Statement type: