docs: updates for v1.6.0
All checks were successful
Lint / shellcheck (push) Successful in 18s

This commit is contained in:
2026-04-01 13:02:16 +02:00
parent 90d8e25b70
commit b65c4c6665
3 changed files with 25 additions and 3 deletions

View File

@@ -8,6 +8,8 @@ title = "Configuration"
```conf ```conf
title = "kewt" title = "kewt"
style = "kewt" style = "kewt"
lang = "en"
draft_by_default = false
dir_indexes = true dir_indexes = true
single_file_index = true single_file_index = true
flatten = false flatten = false
@@ -33,9 +35,17 @@ posts_dir = ""
posts_per_page = 12 posts_per_page = 12
custom_admonitions = "" custom_admonitions = ""
cw_hide_url = true cw_hide_url = true
generate_tags = false
tags_dir = "tags"
generate_search = false
search_in_footer = false
search_in_header = false
include_cw_pages_in_search = false
``` ```
- `title` - site title - `title` - site title
- `style` - style file name from `./styles` (without `.css`) - `style` - style file name from `./styles` (without `.css`)
- `lang` - document language, used for the `<html lang="...">` 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` - `dir_indexes` - generate directory index pages when missing `index.md`
- `single_file_index` - if a directory has one markdown file and no `index.md`, use that file as `index.html` - `single_file_index` - if a directory has one markdown file and no `index.md`, use that file as `index.html`
- `flatten` - flatten sidebar directory levels - `flatten` - flatten sidebar directory levels
@@ -53,14 +63,20 @@ cw_hide_url = true
- `generate_page_title` - automatically generate title text from the first markdown heading or filename (default: true) - `generate_page_title` - automatically generate title text from the first markdown heading or filename (default: true)
- `error_page` - filename for the generated 404 error page (default: "not_found.html", empty to disable) - `error_page` - filename for the generated 404 error page (default: "not_found.html", empty to disable)
- `versioning` - append a version query parameter (`?v=timestamp`) to css asset urls to bypass cache (default: false) - `versioning` - append a version query parameter (`?v=timestamp`) to css asset urls to bypass cache (default: false)
- `enable_header_links` - turns markdown section headings into clickable anchor links (default: true)
- `base_url` - absolute URL of the site, used for sitemap and RSS feed generation - `base_url` - absolute URL of the site, used for sitemap and RSS feed generation
- `generate_feed` - enable RSS feed generation (requires `base_url`) - `generate_feed` - enable RSS feed generation (requires `base_url`)
- `feed_file` - filename for the generated RSS feed (default: "rss.xml") - `feed_file` - filename for the generated RSS feed (default: "rss.xml")
- `posts_dir` - directory name containing posts (e.g., "posts"). Enables reverse-chronological sorting, title headings in indexes, and automatic backlinks. - `posts_dir` - directory name containing posts (e.g., "posts"). Enables reverse-chronological sorting, title headings in indexes, and automatic backlinks.
- `posts_per_page` - number of posts per page in paginated post indexes (default: 12). Set to 0 to disable pagination. - `posts_per_page` - number of posts per page in paginated post indexes (default: 12). Set to 0 to disable pagination.
- `enable_header_links` - turns markdown section headings into clickable anchor links (default: true)
- `custom_admonitions` - comma separated list of custom admonitions - `custom_admonitions` - comma separated list of custom admonitions
- `cw_hide_url` - embeds non-breaking JS to replace the URL in the browser bar on content warning pages (default: true) - `cw_hide_url` - embeds non-breaking JS to replace the URL in the browser bar on content warning pages (default: true)
- `generate_tags` - generate tag index pages from post frontmatter (requires `posts_dir`)
- `tags_dir` - directory name for generated tag pages (default: "tags")
- `generate_search` - generate a `search.json` index for client-side search
- `search_in_footer` - include a search box in the page footer (requires `generate_search`)
- `search_in_header` - include a search box in the page header (requires `generate_search`)
- `include_cw_pages_in_search` - include content warning pages in the search index (default: false)
## Dot Files ## Dot Files

View File

@@ -11,10 +11,12 @@ title = "Custom Page Title"
date = "2026-03-23 11:32" date = "2026-03-23 11:32"
draft = false draft = false
description = "A short page summary" description = "A short page summary"
tags = "example, tutorial"
--- ---
``` ```
- `title` - overrides the page title, post name in index links, and RSS `<title>`. - `title` - overrides the page title, post name in index links, and RSS `<title>`.
- `date` - overrides the post date and time. Supports `YYYY-MM-DD` and `YYYY-MM-DD HH:MM` (or `HH-MM`). - `date` - overrides the post date and time. Supports `YYYY-MM-DD` and `YYYY-MM-DD HH:MM` (or `HH-MM`).
- `draft` - if `true`, the file is excluded from HTML generation. - `draft` - if `true`, the file is excluded from HTML generation. If not set, uses the `draft_by_default` config value.
- `description` - page description, used for Open Graph `og:description` meta tag. - `description` - page description, used for Open Graph `og:description` meta tag.
- `tags` - comma separated list of tags. Used for tag index generation when `generate_tags` is enabled in `site.conf`.
- `content_warning` - if set, creates an interstitial warning page that the user must click through. If set to `true` uses a generic warning, otherwise uses your string. - `content_warning` - if set, creates an interstitial warning page that the user must click through. If set to `true` uses a generic warning, otherwise uses your string.

View File

@@ -13,3 +13,7 @@ When customizing `template.html`, the placeholders available are:
- `{{LANG}}` - the configured document language - `{{LANG}}` - the configured document language
- `{{HEAD_EXTRA}}` - meta-tags - `{{HEAD_EXTRA}}` - meta-tags
- `{{HEADER_BRAND}}` - header rendering the name and/or logo - `{{HEADER_BRAND}}` - header rendering the name and/or logo
## Search
When `generate_search` is enabled, kewt embeds a search bar into pages based on the `search_in_header` and `search_in_footer` config options. The search uses a `search.json` index generated at build time and a client-side JS script. No external dependencies are required.