Configuration
Configure LSSG via TOML comments at the start of markdown files. Resources (CSS, JavaScript, images, fonts, videos) are automatically discovered through links and copied to the build directory.
Resource Locations
Resources can be:
- Referenced directly in markdown:
 - Imported in CSS files:
@import url('fonts/custom.css'); - Linked in HTML:
<script src="./script.js"></script> - Used as custom elements:
<carousel></carousel>
All discovered resources are automatically included in the build output without manual configuration. Glob) patterns are supported too, so you can reference sets of files with patterns like images/*, assets/**/*.js, or fonts/*.{woff,woff2}.
Configuration Options
| Option | Type | Default | Description | Inherited* |
|---|---|---|---|---|
root | Boolean | false | Disable parent inheritance | N/A |
title | String | First H1 | Page title for browser tab and SEO | Yes |
language | String | "en" | HTML language attribute | Yes |
section_links | Boolean | true | Show link icons on h2 headers on hover | Yes |
meta | Object | {} | Custom meta tags (key-value pairs) | Yes |
head | Array[String] | [] | Custom HTML elements for <head> | Yes |
[nav] Navigation Options | ||||
nav.kind | String | "breadcrumbs" | Navigation type: "breadcrumbs", "sidemenu", or "none" | Yes |
nav.include_root | Boolean | false | Include root page in side menu (sidemenu only) | Yes |
nav.name_map | Object | {} | Custom display names for pages | Yes |
nav.ignore | String[] | [] | Ignore certain pages from navigation | Yes |
[footer] Footer Options | ||||
footer.items | Array[String] | ["Generated by Lssg"] | Footer HTML elements or text | Yes |
footer.custom | String | - | Custom footer HTML (replaces items) | Yes |
[post_config] Post Config Module | ||||
use_fs_dates | Boolean | false | Use filesystem dates instead of manual dates | Yes |
[post] Post Page Module | ||||
render | Boolean | true | Enable post-specific rendering | No |
created_on | String | - | Publication date (ISO or YYYY-MM-DD) | No |
modified_on | String | - | Last modification date (ISO or YYYY-MM-DD) | No |
tags | Array[String] | [] | Post tags/categories | No |
summary | String | - | Post summary/excerpt | No |
[rss] RSS generation from posts | ||||
rss.path | String | "feed.xml" | RSS feed output filename | Yes |
rss.title | String | "Feed" | RSS feed title | Yes |
rss.description | String | "My feed" | RSS feed description | Yes |
rss.host | String | - | Base URL (required for RSS) | Yes |
rss.language | String | - | RSS language code | Yes |
rss.last_build_date_enabled | Boolean | true | Add the lastBuildDate key to RSS feed | Yes |
[media] Media Module - Images | ||||
enabled | Boolean | true | Enable media module | Yes |
optimize_images | Boolean | true | Enable image optimization | Yes |
image_quality | Integer (1-100) | 85 | JPEG/PNG compression quality | Yes |
convert_to_webp | Boolean | true | Convert images to WebP format | Yes |
webp_quality | Integer (1-100) | 95 | WebP quality (≥95 is lossless) | Yes |
max_width | Integer | 1920 | Maximum image width in pixels | Yes |
max_height | Integer | 1080 | Maximum image height in pixels | Yes |
resize_threshold_bytes | Integer | 1000000 | Min file size (bytes) to trigger resize | Yes |
optimize_videos | Boolean | true | Enable video optimization | Yes |
use_ffmpeg | Boolean | true | Use FFmpeg (must be installed) | Yes |
video_crf | Integer (0-51) | 25 | Video quality (lower = better, 18-28 recommended) | Yes |
[external] External Module | ||||
href | String (URL) | - | URL to ZIP file containing HTML site to import | No |
Configuration Inheritance
Inheritance means configuration settings automatically flow down from parent pages to their children based on your site's directory structure.
How It Works
Configuration options set in a parent page (e.g., docs/index.md) automatically apply to all child pages in subdirectories (e.g., docs/tutorials/tutorial1.md) without needing to repeat them.
Example directory structure:
docs/
index.md ← parent (sets language="de", nav.kind="sidemenu")
tutorials/
tutorial1.md ← child (inherits both settings)
tutorial2.md ← child (inherits both settings)
Key Behaviors
- Automatic propagation: Options marked "Yes" in the "Inherited" column propagate to all descendant pages
- Override capability: Child pages can specify their own values to replace inherited ones
- Break the chain: Use
root = truein a page to stop inheriting from parents and start fresh
Practical Example
Parent page sets site-wide defaults:
<!-- docs/index.md -->
<!--
language = "nl"
[nav]
kind = "sidemenu"
[footer]
watermark = true
-->
Child page inherits everything:
<!-- docs/tutorials/tutorial1.md -->
<!-- Automatically has language="de", nav.kind="sidemenu", footer.watermark=true -->
# Tutorial 1
Child page overrides specific values:
<!-- docs/tutorials/tutorial2.md -->
<!--
language = "en" # Override: use English instead of inherited German
-->
# Tutorial 2
<!-- Still inherits nav.kind="sidemenu" and footer.watermark=true -->
This inheritance system eliminates repetition and makes site-wide changes easy—just update the parent configuration.
Example
<!--
title = "My Blog Post"
language = "en"
section_links = true
[meta]
description = "A great post about Rust"
author = "Your Name"
[nav]
kind = "sidemenu"
include_root = true
name_map = { home = "Home Page", post = "Post Posts" }
[post]
created_on = "2025-01-03"
tags = ["rust", "tutorial"]
summary = "Learn about static site generators"
[media]
optimize_images = true
image_quality = 85
convert_to_webp = true
[footer]
items = ['<a href="/about">About</a>', '<a href="/contact">Contact</a>']
watermark = true
-->
# Page Content