Dungeon Press is a markdown powered static site generator for Dungeons & Dragons.
View Demo
·
Report Bug
·
Request Feature
Table of Contents
Dungeon Press is a static site generator that leverages the simplicity and flexibility of Markdown to create interactive tabletop adventures with a clean, minimalistic design. It's designed to cater to both creators and players by offering advanced formatting features, dynamic content adjustment, and easy publishing options.
Dungeon Press utilizes GitHub flavored markdown, enhancing it with features to support advanced formatting such as dialogues, dice rolls, difficulty checks, ability scores, and more.
Details about your adventure, such as the author, description, and version are configured through a self-contained, frontmatter style YAML configuration, making your adventure setup straightforward and customizable.
The platform enables users to highlight text sections, bookmark them, and annotate with notes or general observations. It supports saving checkbox states, with all data stored in the browser's local storage, making it easy to pick up right where you left off.
Dungeon Press introduces procedural content generation through randomized tables based on a seed. Creators can set a default seed for their adventure or allow players to choose one, adding a unique twist to each playthrough.
Adjust the challenge level of your adventure with scalable difficulty checks, ability scores, dice rolls, and values across three difficulty settings: casual, intended, and difficult. This feature adjusts values and modifiers to ensure a balanced experience for all players.
With Dungeon Press, publishing your adventure is a breeze. It builds a fully responsive static HTML bundle compatible with any HTTP server, with SEO friendliness through meta tags and structured LD+JSON data. Mobile, tablet, and desktop devices are all supported. Media and other files included in the /public
directory are automatically included with the exported bundle.
Configure external links, social media profiles, titles, hero images, and more through dungeonpress.config.js
. Themes can be easily adjusted using CSS variables contained in style.css
, and the index.html
file can be altered to add things like Google Analytics tags.
Dungeon Press supports both light and dark modes through media queries and CSS variables.
- Vite
- React
- Marked
To get a local copy up and running follow these simple steps.
To run this project you'll need the following software installed:
- Create a copy of this project by using the "Use this template" feature on GitHub, or by forking this repository
- Clone your copy of the repo
git clone https://github.com/<your-username>/<your-app>.git
- Install required dependencies with
npm install
- Run the project with
npm run dev
- Open
adventure.md
and get to work!
Your adventure will now be available at http://localhost:5173. Any changes made to adventure.md
will automatically be reflected in the browser.
Additional customization can be found in dungeonpress.config.js
. If you'd like to adjust the look, colors, fonts, and other theme related styles can be adjusted via CSS variables in style.css
.
To build an HTML bundle suitable for publishing, run npm run build
and the output will be generated in the dist
directory.
Dungeon Press supports most features of GitHub flavoured Markdown, while adding many of its own to support the features need to write an organized and dynamic tabletop adventure.
Here is a list of the additional features that Dungeon Press introduces.
Some features scale with difficulty. These features can be scaled by either a static modifier, or a percentage by appending the value with a %
. Values can be scaled either up or down, and the direction can be inverted by appending the value with a ~
.
These are the available difficulties and their modfiers/percentages:
- Casual (-2/x0.66)
- Intended (0/x1.00)
- Difficult (+2/x1.33)
Ability scores are scaled with difficulty.
Creates an ability score table with modifiers.
Format:
||<STR>,<DEX>,<CON>,<INT>,<WIS>,<CHA>||
Example:
||12,15,12,3,12,6||
||17,15,15,3,12,7||%~
Indented description list item with a bolded inline heading.
Hint: try using quotes with description lists to build dialog options.
Format:
:: <HEADING> :: <DESCRIPTION>
Example:
:: What Does Spritzel Look Like? :: "He's a white-furred otter with a brown patch above his right eye, and he wears a pearl earring."
Collapsable block of content with a heading.
Parameters
open
when present, the block will be open by default
Format:
[[ <HEADING> [parameters]
Lorem ipsum dolor sit amet.
]]
Example:
[[ Actions open
:: Bite. :: *Melee Weapon Attack:* #+5 to hit, reach 5 ft., one target. *Hit:* 2d6+3% piercing damage. If the target is a creature, it must succeed on a dc13|strength saving throw or be knocked prone.
]]
Stylized blocks intended to convey supplementary or important information to the players and dungeon master.
Parameters
narrative
blocks are meant to be read aloud to the playersinfo
blocks are for information intended for only the dungeon masterthing
blocks can be used to create NPCs, items, spells, locations, etc.
Format:
{{ [parameters]
Lorem ipsum dolor sit amet.
}}
Example:
{{ narrative
Travel is incredibly difficult in the deep snow. A bitter wind cuts through your clothing, and ice crystals riding the strong breeze sting your eyes.
}}
Stylized text useful for distinguishing dialog and speech.
Format:
"Lorem ipsum dolor sit amet."
Example:
:: What Does Spritzel Look Like? :: "He's a white-furred otter with a brown patch above his right eye, and he wears a pearl earring."
Dice rolls are scaled with difficulty.
Shortcuts for creating dice rolls, with averages automatically included.
Format:
<NUMBER>d<NUMBER>[+/-]<NUMBER>
Examples:
1d2
1d4+2
1d6-4
1d8+6%~
Difficulty checks are scaled with difficulty.
Shortcuts for creating difficulty checks.
Format:
dc<NUMBER>|<SKILL OR ABILITY>
Examples:
dc10
dc|perception
dc13|strength
dc10|nature|animal_handling
dc10%~
Static values that scale with difficulty.
Hint: values that start with ## are still stylized, but are not scaled with difficulty.
Format:
#+<NUMBER>
#-<NUMBER>
##<NUMBER>
Examples:
#+3
#-4
##5
#+6%~
Inline checkboxes will retain their checked state, stored in the browser's local storage.
Heading levels between 1 and 3 will automatically be added to the table of contents. These headings can also be externally linked to via fragment identifiers.
# Heading 1
## Heading 2
### Heading 3
As we all know, a good adventure always has a few tables. Dungeon Press adds two special table features to help you generate content efficiently.
You can create a roll table by prefixing the first column heading with d<NUMBER>
. Roll tables will automatically generate a column for the number value of the roll result.
Format:
| d<NUMBER> <HEADING> |
|---------------------|
| Item 1 |
| item 2 |
| etc... |
Example:
| d4 Treasure Chest Contents |
|----------------------------|
| 100 gp |
| +1 Dagger |
| Potion of Healing x 5 |
| Just a rock |
Random tables take this a step further. Replace the d
with an r
and Dungeon Press will randomly pick a number of rows from the table equal to the number of outcomes possible given the dice.
Create more rows than there are outcomes to make random pools of content. Rows are picked based on a random seed which can be configured by the author or overridden by the player in the UI.
Format:
| r<NUMBER> <HEADING> |
|---------------------|
| Item 1 |
| item 2 |
| etc... |
Example:
| r4 Treasure Chest Contents |
|----------------------------|
| 100 gp |
| +1 Dagger |
| Potion of Healing x 5 |
| Just a rock |
| Sack full of beans |
| Empty bottle |
| Chipped emerald |
| A miniature horse saddle |
Only 4 of 8 items from the example table will be visible on the page!
The values in the YAML configuration of your adventure (your adventure's "attributes") are made available to index.html
. Use the format {{attribute.<KEY>}}
to access these values inside of index.html
.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the Apache 2.0 License. See LICENSE.txt
for more information.
Project Link: https://github.com/twocatmoon/dungeon-press