No description
- TypeScript 77.6%
- CSS 20.2%
- JavaScript 2.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .github | ||
| docs | ||
| examples | ||
| src | ||
| .gitignore | ||
| CONTRIBUTING.md | ||
| esbuild.config.mjs | ||
| LICENSE.md | ||
| manifest.json | ||
| package.json | ||
| README.md | ||
| styles.css | ||
| tsconfig.json | ||
| version-bump.mjs | ||
| versions.json | ||
Obsidian Stat Blocks
An Obsidian plugin for creating D&D 5e/5.5e stat blocks from TOML.
Overview
Write a fenced monster code block in an Obsidian Markdown note. In Live Preview, it renders as a themed stat block when the cursor is outside the block and becomes editable TOML when the cursor enters it. Reading view always shows the rendered stat block.
Start with the usage guide, then see the format token reference, preset reference, or the Ancient Red Dragon and Lich examples.
Quickstart
bun install
bun run dev # watch build with inline sourcemaps
# or
bun run build # typecheck and production bundle
Copy main.js, manifest.json, and styles.css into <vault>/.obsidian/plugins/obsidian-stat-blocks/, enable Stat Blocks under Settings → Community plugins, and reload Obsidian after rebuilding.
Features
- TOML-backed
monstercode blocks. - Live Preview rendering with cursor-based source editing.
- TOML syntax highlighting while editing.
- Calculated ability modifiers, attack bonuses, save DCs, damage averages, hit points, proficiency bonuses, and XP.
- Traits, actions, bonus actions, reactions, legendary actions, villain actions, and mythic actions.
- Markdown rendering inside stat block text, including wiki links, hyperlinks, emphasis, and other formatting.
- Theme-aware styling using Obsidian CSS variables.
- Optional responsive two-panel stat blocks with
two_column = true.
Project Stack
- TypeScript
- Obsidian 1.5+
smol-toml- CodeMirror 6 and
@codemirror/legacy-modes - esbuild
- Bun
