From 07518494924bd574301ff53d6da65b1fe4329d67 Mon Sep 17 00:00:00 2001 From: "N0\\A" Date: Wed, 1 Apr 2026 15:04:57 +0200 Subject: [PATCH] docs: theming --- site/docs/configuration.md | 2 +- site/docs/embeds.md | 8 +++++ site/docs/theming.md | 60 ++++++++++++++++++++++++++++++++++++++ site/docs/usage.md | 2 ++ site/heaven/index.md | 2 +- 5 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 site/docs/theming.md diff --git a/site/docs/configuration.md b/site/docs/configuration.md index 911b400..38f8493 100644 --- a/site/docs/configuration.md +++ b/site/docs/configuration.md @@ -43,7 +43,7 @@ search_in_header = false include_cw_pages_in_search = false ``` - `title` - site title -- `style` - style file name from `./styles` (without `.css`) +- `style` - style name from the built-in `styles/` directory. See [Theming](theming.md) - `lang` - document language, used for the `` attribute (default: "en") - `draft_by_default` - default value for the `draft` frontmatter field in new posts created (default: false) - `dir_indexes` - generate directory index pages when missing `index.md` diff --git a/site/docs/embeds.md b/site/docs/embeds.md index 0a2705d..ec90b87 100644 --- a/site/docs/embeds.md +++ b/site/docs/embeds.md @@ -13,6 +13,14 @@ title = "Embeds" If you want to **force** a file to be inlined, use `\!![]` instead of `\![]` +## Reality-Breaking Embeds + +`\!![link]` and `\!![alt](link)` work even inside inline code blocks. If the content between backticks consists only of `\!![]` embeds, the embed triggers and the content is inlined instead of being rendered as code. + +``` +`!![/file.sh]` +``` + ## Typed Embeds Force specific output regardless of extension: diff --git a/site/docs/theming.md b/site/docs/theming.md new file mode 100644 index 0000000..4fa0372 --- /dev/null +++ b/site/docs/theming.md @@ -0,0 +1,60 @@ +--- +title = "Theming" +--- +# Theming + +*kewt* has a few colour palettes built-in. Set the `style` option in `site.conf` to a theme name to apply it. + +## Built-in Themes + +| Theme | `style` value | Dark/Light | +|---|---|---| +| Kewt (default) | `kewt` | Light | +| Kewt Light | `kewt-light` | Light | +| Nord | `nord` | Dark | +| Nord Light | `nord-light` | Light | +| Monokai | `mono` | Dark | +| Monokai Light | `mono-light` | Light | +| One Dark | `onedark` | Dark | +| One Light | `onelight` | Light | +| Rose Pine | `rosepine` | Dark | +| Rose Pine Light | `rosepine-light` | Light | +| Solarized | `solarized` | Light | +| Solarized Dark | `solarized-dark` | Dark | + +```conf +style = "kewt-light" +``` +## How It Works + +Each theme is a `.root.css` file containing a `:root` block with CSS custom properties. At build time, *kewt* merges the theme's variables with the base `kewt.css` stylesheet. The base `:root` block is stripped out and replaced with the theme's variables. + +## Style Resolution + +*kewt* resolves styles in this priority order (highest wins): + +1. `site/styles.css` - a full custom stylesheet in your site directory. Overrides everything. +2. `site/styles.root.css` - custom `:root` variables merged with the built-in `kewt.css` base. +3. built-in `