feat: enable PDF output for pages
Assisted-by: Delta:zai-glm-5.3
This commit is contained in:
3 files changed
+9
-3
No files matched your search
@@ -50,6 +50,10 @@ target = "<category>/<page>.typ"
|
|||||||
|
|
||||||
Sidebar labels come from the page's `#metadata(...)` line, not from the config.
|
Sidebar labels come from the page's `#metadata(...)` line, not from the config.
|
||||||
|
|
||||||
|
Every page also renders a printable PDF twin (`pdf = true` in
|
||||||
|
`calepin.toml`, selectable in the page's view picker). Add `pdf: false` to a
|
||||||
|
page's `#metadata(...)` to skip its PDF, as `404.typ` does.
|
||||||
|
|
||||||
## Adding a category
|
## Adding a category
|
||||||
|
|
||||||
1. Create `site/<category>/` with an `index.typ`, using
|
1. Create `site/<category>/` with an `index.typ`, using
|
||||||
@@ -69,8 +73,9 @@ sidebar.
|
|||||||
|
|
||||||
## Deployment
|
## Deployment
|
||||||
|
|
||||||
`just build` produces a fully static site in `public/`: HTML pages plus
|
`just build` produces a fully static site in `public/`: HTML pages with
|
||||||
`sitemap.xml`, `robots.txt`, and `llms.txt`. The Gitea Actions workflow in
|
printable PDF twins, plus `sitemap.xml`, `robots.txt`, and `llms.txt`. The
|
||||||
|
Gitea Actions workflow in
|
||||||
`.gitea/workflows/build.yml` builds the site on every push with the same
|
`.gitea/workflows/build.yml` builds the site on every push with the same
|
||||||
pinned toolchain and uploads `public/` as an artifact for deployment to any
|
pinned toolchain and uploads `public/` as an artifact for deployment to any
|
||||||
static host.
|
static host.
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
#set document(title: [Not found])
|
#set document(title: [Not found])
|
||||||
|
#metadata((pdf: false)) <website-metadata>
|
||||||
|
|
||||||
#title()
|
#title()
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@ title = "Yggdrasil"
|
|||||||
description = "Personal knowledge base."
|
description = "Personal knowledge base."
|
||||||
base-url = "https://yggdrasil.kb28.ch"
|
base-url = "https://yggdrasil.kb28.ch"
|
||||||
theme = "themes/yggdrasil"
|
theme = "themes/yggdrasil"
|
||||||
pdf = false
|
pdf = true
|
||||||
minify = true
|
minify = true
|
||||||
search = "pagefind"
|
search = "pagefind"
|
||||||
logo = "assets/yggdrasil.svg"
|
logo = "assets/yggdrasil.svg"
|
||||||
|
|||||||
Reference in new issue
Block a user