From c63794d3da3c599cf08854d30c0cf6f2b4ed1986 Mon Sep 17 00:00:00 2001 From: historia Date: Tue, 8 Sep 2026 17:31:49 -0400 Subject: feat: explicitly listed and orderable categories --- README.md | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 03ab255..d5e4db5 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ chmod +x /usr/bin/ssg-blog ssg-blog src dst 'https://my-website.net' ``` -ssg-blog checks for subdirectories in the src directory, each of which becomes a category heading (non-recursively). It will generate a sorted list of links to any .md file in those directory (including nested directories). +Blog categories are hard-coded in the `CATEGORIES` variable at the top of the script. Each one becomes a category heading in the order listed. Blog posts should be in a directory with the same name. ``` ssg-blog/ @@ -60,14 +60,6 @@ Note a few things about the output: 2. Files named index.md will get have a link generated without .html at the end. 3. Files outside subdirectories (e.g. about.md) will be rendered but won't show up on the index. -## Change how categories are sorted - -The category headings are sorted alphabetically. If you want to change this, you have to edit the `sort` on this line: - -``` -find "$src" -mindepth 1 -maxdepth 1 -type d ! -path "*/.*" | sort | -``` - # Differences from ssg The title argument from ssg is unnecessary so I've removed it. `render_html_file` used it to modify the first `

` tag and auto-populate the `` if none is specified, which is functionality I've never needed. Instead I check the frontmatter of each blog post and update the `<title>` tag with the `title:` field. -- cgit v1.2.3