1
0
forked from N0VA/kewt
Files
kewt/site/docs/templates.md
2026-05-05 20:39:55 +02:00

23 lines
1.1 KiB
Markdown

---
title = "Templates"
---
# Templates
When customizing `template.html`, the placeholders available are:
- `{{CONTENT}}` - the generated content
- `{{TITLE}}` - the generated title
- `{{NAV}}` - the generated navigation
- `{{FOOTER}}` - the configured footer
- `{{VERSION}}` - the cache-busting string from `versioning = true` (e.g. `?v=12345678`). Safe to use even if versioning is **disabled** (it will be empty).
- `{{CSS}}` - the configured CSS file path
- `{{LANG}}` - the configured document language
- `{{HEAD_EXTRA}}` - meta-tags
- `{{HEADER_BRAND}}` - header rendering the name and/or logo
- `{{HEADER_SEARCH}}` - header search form when `search_in_header = true`
## 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.
If you use a custom template and want header search enabled, make sure your `template.html` includes `{{HEADER_SEARCH}}` somewhere inside `<header>`.