From 990f92017d4cabf8e28df0f615db8dac449edded Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Thu, 2 Jul 2026 16:43:51 -0400 Subject: feat: rss title/description populated from args --- README.md | 18 +++++++++++++++++- demo/dst/rss.xml | 4 ++-- ssg-blog | 4 ++-- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 8423c32..e3fcbf0 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,23 @@ See [https://romansolotarev.com/ssg.html](https://romanzolotarev.com/ssg.html) f 3. `chmod +x /usr/bin/ssg-blog` 4. `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). Each .md file may include frontmatter with the title and a YYYY-MM-DD date like this to be included in the index page: +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). + +``` +ssg-blog/ +├─ src/ +│ ├─ category/ +│ │ ├─ article1_dir/ +│ │ │ ├─ article1.md +│ │ │ ├─ some_assets/ +│ │ │ │ ├─ some_header.png +│ │ ├─ article2.md +│ │ ├─ article3.md +│ ├─ another_category/ +... +``` + +Each .md file may include frontmatter with the title and a YYYY-MM-DD date like this to be included in the index page: ```markdown --- diff --git a/demo/dst/rss.xml b/demo/dst/rss.xml index 34d2e0a..b52750f 100644 --- a/demo/dst/rss.xml +++ b/demo/dst/rss.xml @@ -1,9 +1,9 @@ -Blog +https://example.org https://example.org/ -Blog +https://example.org This is a very interesting article about stamps diff --git a/ssg-blog b/ssg-blog index 3c33dbe..398aa77 100755 --- a/ssg-blog +++ b/ssg-blog @@ -263,9 +263,9 @@ render_rss() { echo '' echo '' echo '' - echo "Blog" + echo "$base_url" echo "$base_url/" - echo "Blog" + echo "$base_url" echo "" while IFS='|' read -r category date title url; do -- cgit v1.2.3