docs: add frontmatter defaults and enrich theming
Update Tera link to canonical URL, add authoring syntax pointer. Add Default column to frontmatter fields table with source-verified values. Enrich Theme System section with core CSS variables table and customization pattern.
This commit is contained in:
@@ -88,18 +88,18 @@ link_to: https://... # External link (for project cards)
|
|||||||
|
|
||||||
### Frontmatter Fields
|
### Frontmatter Fields
|
||||||
|
|
||||||
| Field | Type | Description |
|
| Field | Type | Default | Description |
|
||||||
| -------------- | ------- | ---------------------------------------------- |
|
| -------------- | ------- | -------------- | ---------------------------------------------- |
|
||||||
| `title` | string | Page title (required) |
|
| `title` | string | _(required)_ | Page title |
|
||||||
| `description` | string | Meta description |
|
| `description` | string | _(none)_ | Meta description |
|
||||||
| `date` | string | Publication date (YYYY-MM-DD) |
|
| `date` | string | _(none)_ | Publication date (YYYY-MM-DD) |
|
||||||
| `weight` | integer | Sort order (lower = first, default 50) |
|
| `weight` | integer | `50` | Sort order (lower = first) |
|
||||||
| `nav_label` | string | Override navigation label (defaults to title) |
|
| `nav_label` | string | title | Override navigation label |
|
||||||
| `section_type` | string | Template dispatch (e.g., "blog", "projects") |
|
| `section_type` | string | directory name | Template dispatch (e.g., "blog", "projects") |
|
||||||
| `template` | string | Custom template path |
|
| `template` | string | _(none)_ | Custom template name |
|
||||||
| `toc` | boolean | Enable/disable table of contents for this page |
|
| `toc` | boolean | global setting | Enable/disable table of contents for this page |
|
||||||
| `link_to` | string | External URL (renders as link instead of page) |
|
| `link_to` | string | _(none)_ | External URL (renders as link instead of page) |
|
||||||
| `tags` | list | Tags for categorization |
|
| `tags` | list | `[]` | Tags for categorization |
|
||||||
|
|
||||||
### Section Types
|
### Section Types
|
||||||
|
|
||||||
|
|||||||
@@ -205,6 +205,36 @@ sukr includes several themes in the `themes/` directory:
|
|||||||
|
|
||||||
Copy the theme files to your project and import as shown above.
|
Copy the theme files to your project and import as shown above.
|
||||||
|
|
||||||
|
### Core Variables
|
||||||
|
|
||||||
|
All themes define these CSS custom properties in `:root`:
|
||||||
|
|
||||||
|
| Variable | Description |
|
||||||
|
| --------------- | ---------------------- |
|
||||||
|
| `--hl-keyword` | Keywords, control flow |
|
||||||
|
| `--hl-string` | String literals |
|
||||||
|
| `--hl-function` | Function names |
|
||||||
|
| `--hl-comment` | Comments |
|
||||||
|
| `--hl-type` | Type names |
|
||||||
|
| `--hl-number` | Numeric literals |
|
||||||
|
| `--hl-variable` | Variables |
|
||||||
|
| `--hl-operator` | Operators |
|
||||||
|
|
||||||
|
### Customizing a Theme
|
||||||
|
|
||||||
|
Import a theme, then override specific variables in your own CSS:
|
||||||
|
|
||||||
|
```css
|
||||||
|
@import "themes/dracula.css";
|
||||||
|
|
||||||
|
/* Override just the keyword color */
|
||||||
|
:root {
|
||||||
|
--hl-keyword: #e879f9;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Changing a variable updates every scope that references it.
|
||||||
|
|
||||||
### Theme Structure
|
### Theme Structure
|
||||||
|
|
||||||
Themes use CSS custom properties for easy customization:
|
Themes use CSS custom properties for easy customization:
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ description: Customizable templates without recompilation
|
|||||||
weight: 1
|
weight: 1
|
||||||
---
|
---
|
||||||
|
|
||||||
sukr uses [Tera](https://tera.netlify.app/), a Jinja2-like templating engine. Templates are loaded at runtime, so you can modify them without recompiling sukr.
|
sukr uses [Tera](https://keats.github.io/tera/), a Jinja2-like templating engine. Templates are loaded at runtime, so you can modify them without recompiling sukr. See the [Tera documentation](https://keats.github.io/tera/docs/) for template authoring syntax (filters, blocks, inheritance).
|
||||||
|
|
||||||
## Template Directory Structure
|
## Template Directory Structure
|
||||||
|
|
||||||
|
|||||||
@@ -73,9 +73,9 @@ None. All CHALLENGE questions resolved.
|
|||||||
- [x] Rewrite `_index.md` as explanation quadrant (what sukr is, why it exists, link to tutorial)
|
- [x] Rewrite `_index.md` as explanation quadrant (what sukr is, why it exists, link to tutorial)
|
||||||
- [x] Slim `features/sections.md` to reference-only (section_type field, template dispatch)
|
- [x] Slim `features/sections.md` to reference-only (section_type field, template dispatch)
|
||||||
- [x] Move explanation content from `sections.md` into `content-organization.md`
|
- [x] Move explanation content from `sections.md` into `content-organization.md`
|
||||||
- [ ] Add link to upstream Tera docs in `features/templates.md`
|
- [x] Add link to upstream Tera docs in `features/templates.md`
|
||||||
- [ ] Add defaults column to frontmatter table in `configuration.md`
|
- [x] Add defaults column to frontmatter table in `configuration.md`
|
||||||
- [ ] Add "Theming" section to `syntax-highlighting.md` (choosing/customizing themes)
|
- [x] Add "Theming" section to `syntax-highlighting.md` (choosing/customizing themes)
|
||||||
|
|
||||||
3. **Phase 3: Fill Content Gaps** — cover Deploy and Customize stages of user journey
|
3. **Phase 3: Fill Content Gaps** — cover Deploy and Customize stages of user journey
|
||||||
- [ ] Create `docs/content/deployment.md` (how-to: generic static host deployment + platform links)
|
- [ ] Create `docs/content/deployment.md` (how-to: generic static host deployment + platform links)
|
||||||
|
|||||||
Reference in New Issue
Block a user