diff --git a/README.md b/README.md index 32ebe07..70096b3 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ site generator. ## Layout - `site/` — website sources: `calepin.toml` + `.typ` pages +- `site/themes/yggdrasil/` — local theme extending the bundled `calepin` theme - `public/` — generated site (gitignored) - `tools/` — pinned `calepin` and `typst` binaries (gitignored, downloaded on demand) - `scripts/` — helper scripts used by the Justfile and CI @@ -59,6 +60,12 @@ Sidebar labels come from the page's `#metadata(...)` line, not from the config. top navigation bar. The `label` is required here because the index page's metadata title is `Overview`. +Pages inside a category show only that category's sidebar section — the +local theme (`site/themes/yggdrasil/partials/site-nav-sidebar.html`) filters +the sidebar to the section containing the current page. Pages outside every +category (landing page, `404`, standalone pages) fall back to the full +sidebar. + ## Deployment `just build` produces a fully static site in `public/`: HTML pages plus diff --git a/site/calepin.toml b/site/calepin.toml index 15a4265..fade09e 100644 --- a/site/calepin.toml +++ b/site/calepin.toml @@ -1,7 +1,7 @@ title = "Yggdrasil" description = "Personal knowledge base." base-url = "https://yggdrasil.kb28.ch" -theme = "calepin" +theme = "themes/yggdrasil" pdf = false minify = true search = "pagefind" diff --git a/site/themes/yggdrasil/partials/site-nav-sidebar.html b/site/themes/yggdrasil/partials/site-nav-sidebar.html new file mode 100644 index 0000000..5018419 --- /dev/null +++ b/site/themes/yggdrasil/partials/site-nav-sidebar.html @@ -0,0 +1,47 @@ + diff --git a/site/themes/yggdrasil/theme.toml b/site/themes/yggdrasil/theme.toml new file mode 100644 index 0000000..4f40ac0 --- /dev/null +++ b/site/themes/yggdrasil/theme.toml @@ -0,0 +1 @@ +extends = "calepin"