From fec892047e4c0b810981fa8f20223e0b1c4f72b4 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Mon, 15 Jun 2026 18:17:10 -0400 Subject: refactor. added rss feed. --- README.md | 12 +- demo/demo.webp | Bin 0 -> 19374 bytes demo/dst/.files | 8 + demo/dst/404.html | 32 ++++ demo/dst/about.html | 32 ++++ .../an-interesting-article/assets/stamps.webp | Bin 0 -> 46960 bytes .../dst/articles/an-interesting-article/index.html | 34 +++++ .../assets/japanese-train.webp | Bin 0 -> 128168 bytes .../another-interesting-article/index.html | 34 +++++ demo/dst/articles/article3.html | 32 ++++ demo/dst/favicon.png | Bin 0 -> 393 bytes demo/dst/index.html | 37 +++++ demo/dst/lists/board-games.html | 38 +++++ demo/dst/lists/movies.html | 38 +++++ demo/dst/rss.xml | 39 +++++ demo/dst/sitemap.xml | 14 ++ demo/dst/style.css | 54 +++++++ demo/example.webp | Bin 0 -> 15022 bytes demo/src/404.md | 3 + demo/src/_footer.html | 2 + demo/src/_header.html | 28 ++++ demo/src/about.md | 3 + .../an-interesting-article/assets/stamps.webp | Bin 0 -> 46960 bytes demo/src/articles/an-interesting-article/index.md | 12 ++ .../assets/japanese-train.webp | Bin 0 -> 128168 bytes .../articles/another-interesting-article/index.md | 12 ++ demo/src/articles/article3.md | 8 + demo/src/favicon.png | Bin 0 -> 393 bytes demo/src/lists/board-games.md | 14 ++ demo/src/lists/movies.md | 13 ++ demo/src/style.css | 54 +++++++ example/dst/.files | 11 -- example/dst/404.html | 33 ---- example/dst/about.html | 33 ---- .../an-interesting-article/assets/stamps.webp | Bin 46960 -> 0 bytes .../dst/articles/an-interesting-article/index.html | 37 ----- .../assets/japanese-train.webp | Bin 128168 -> 0 bytes .../another-interesting-article/index.html | 37 ----- example/dst/articles/article3.html | 33 ---- example/dst/favicon.png | Bin 393 -> 0 bytes example/dst/index.html | 41 ----- example/dst/lists/board-games.html | 41 ----- example/dst/lists/movies.html | 41 ----- example/dst/sitemap.xml | 14 -- example/dst/style.css | 54 ------- example/example.webp | Bin 15022 -> 0 bytes example/src/404.md | 3 - example/src/_footer.html | 2 - example/src/_header.html | 28 ---- example/src/about.md | 3 - .../an-interesting-article/assets/stamps.webp | Bin 46960 -> 0 bytes .../src/articles/an-interesting-article/index.md | 12 -- .../assets/japanese-train.webp | Bin 128168 -> 0 bytes .../articles/another-interesting-article/index.md | 12 -- example/src/articles/article3.md | 8 - example/src/favicon.png | Bin 393 -> 0 bytes example/src/lists/board-games.md | 14 -- example/src/lists/movies.md | 13 -- example/src/style.css | 54 ------- ssg-blog | 167 +++++++++++++-------- 60 files changed, 652 insertions(+), 592 deletions(-) create mode 100644 demo/demo.webp create mode 100644 demo/dst/.files create mode 100644 demo/dst/404.html create mode 100644 demo/dst/about.html create mode 100644 demo/dst/articles/an-interesting-article/assets/stamps.webp create mode 100644 demo/dst/articles/an-interesting-article/index.html create mode 100644 demo/dst/articles/another-interesting-article/assets/japanese-train.webp create mode 100644 demo/dst/articles/another-interesting-article/index.html create mode 100644 demo/dst/articles/article3.html create mode 100644 demo/dst/favicon.png create mode 100644 demo/dst/index.html create mode 100644 demo/dst/lists/board-games.html create mode 100644 demo/dst/lists/movies.html create mode 100644 demo/dst/rss.xml create mode 100644 demo/dst/sitemap.xml create mode 100644 demo/dst/style.css create mode 100644 demo/example.webp create mode 100644 demo/src/404.md create mode 100644 demo/src/_footer.html create mode 100644 demo/src/_header.html create mode 100644 demo/src/about.md create mode 100644 demo/src/articles/an-interesting-article/assets/stamps.webp create mode 100644 demo/src/articles/an-interesting-article/index.md create mode 100644 demo/src/articles/another-interesting-article/assets/japanese-train.webp create mode 100644 demo/src/articles/another-interesting-article/index.md create mode 100644 demo/src/articles/article3.md create mode 100644 demo/src/favicon.png create mode 100644 demo/src/lists/board-games.md create mode 100644 demo/src/lists/movies.md create mode 100644 demo/src/style.css delete mode 100644 example/dst/.files delete mode 100644 example/dst/404.html delete mode 100644 example/dst/about.html delete mode 100644 example/dst/articles/an-interesting-article/assets/stamps.webp delete mode 100644 example/dst/articles/an-interesting-article/index.html delete mode 100644 example/dst/articles/another-interesting-article/assets/japanese-train.webp delete mode 100644 example/dst/articles/another-interesting-article/index.html delete mode 100644 example/dst/articles/article3.html delete mode 100644 example/dst/favicon.png delete mode 100644 example/dst/index.html delete mode 100644 example/dst/lists/board-games.html delete mode 100644 example/dst/lists/movies.html delete mode 100644 example/dst/sitemap.xml delete mode 100644 example/dst/style.css delete mode 100644 example/example.webp delete mode 100644 example/src/404.md delete mode 100644 example/src/_footer.html delete mode 100644 example/src/_header.html delete mode 100644 example/src/about.md delete mode 100644 example/src/articles/an-interesting-article/assets/stamps.webp delete mode 100644 example/src/articles/an-interesting-article/index.md delete mode 100644 example/src/articles/another-interesting-article/assets/japanese-train.webp delete mode 100644 example/src/articles/another-interesting-article/index.md delete mode 100644 example/src/articles/article3.md delete mode 100644 example/src/favicon.png delete mode 100644 example/src/lists/board-games.md delete mode 100644 example/src/lists/movies.md delete mode 100644 example/src/style.css diff --git a/README.md b/README.md index 1dd1461..8423c32 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,9 @@ This is a modification to the simple static site generator '[ssg](https://romanzolotarev.com/bin/ssg)' by Roman Zolotarev. This is a markdown to HTML static site generator that also creates a minimal blog index page with category headings and posts sorted by date using YAML frontmatter in markdown files. - +It also generates a sitemap.xml and rss.xml file. + + # Install / Usage @@ -23,16 +25,16 @@ publish: false --- ``` -If a file has no frontmatter, no `date`, or `publish: false`, the page won't be included in the index. It will still be rendered in sitemap.xml. +If a file has no frontmatter, no `date`, or `publish: false`, the page won't be included in the index, sitemap, or RSS feed. Setting `publish: true` is optional and equivalent to not having `publish` at all. -## Example +## Demo -There is an example directory in this repo to show you how to set up the files (src) and what the output looks like (dst). This was the command used to generate the example output: +There is a demo directory in this repo to show you an example of how to set up the files (src) and what the output looks like (dst). This was the command used to generate the demo output: ``` -./ssg-blog example/src example/dst 'https://example.org' +./ssg-blog demo/src demo/dst 'https://example.org' ``` Note a few things about the output: diff --git a/demo/demo.webp b/demo/demo.webp new file mode 100644 index 0000000..40f42d0 Binary files /dev/null and b/demo/demo.webp differ diff --git a/demo/dst/.files b/demo/dst/.files new file mode 100644 index 0000000..f7d8b18 --- /dev/null +++ b/demo/dst/.files @@ -0,0 +1,8 @@ +./404.md +./about.md +./lists/movies.md +./lists/board-games.md +./articles/an-interesting-article/index.md +./articles/article3.md +./articles/another-interesting-article/index.md +./style.css diff --git a/demo/dst/404.html b/demo/dst/404.html new file mode 100644 index 0000000..b6e2d1e --- /dev/null +++ b/demo/dst/404.html @@ -0,0 +1,32 @@ + + +
+ + + +I couldn’t find that page.
+ + diff --git a/demo/dst/about.html b/demo/dst/about.html new file mode 100644 index 0000000..b17b7fe --- /dev/null +++ b/demo/dst/about.html @@ -0,0 +1,32 @@ + + + + + + +Here is an about page for my website
+ + diff --git a/demo/dst/articles/an-interesting-article/assets/stamps.webp b/demo/dst/articles/an-interesting-article/assets/stamps.webp new file mode 100644 index 0000000..9785ce7 Binary files /dev/null and b/demo/dst/articles/an-interesting-article/assets/stamps.webp differ diff --git a/demo/dst/articles/an-interesting-article/index.html b/demo/dst/articles/an-interesting-article/index.html new file mode 100644 index 0000000..ea236df --- /dev/null +++ b/demo/dst/articles/an-interesting-article/index.html @@ -0,0 +1,34 @@ + + + + + + +Here is a picture of some cool stamps
+
Thank you for reading my nice article.
+ + diff --git a/demo/dst/articles/another-interesting-article/assets/japanese-train.webp b/demo/dst/articles/another-interesting-article/assets/japanese-train.webp new file mode 100644 index 0000000..c4cab3e Binary files /dev/null and b/demo/dst/articles/another-interesting-article/assets/japanese-train.webp differ diff --git a/demo/dst/articles/another-interesting-article/index.html b/demo/dst/articles/another-interesting-article/index.html new file mode 100644 index 0000000..bc82292 --- /dev/null +++ b/demo/dst/articles/another-interesting-article/index.html @@ -0,0 +1,34 @@ + + + + + + +Aren’t Japanese trains great? I particularly like the boxy ones. Here is a picture of a train:
+
Thank you for looking at this train
+ + diff --git a/demo/dst/articles/article3.html b/demo/dst/articles/article3.html new file mode 100644 index 0000000..2b2c5f9 --- /dev/null +++ b/demo/dst/articles/article3.html @@ -0,0 +1,32 @@ + + + + + + +Wow another one
+ + diff --git a/demo/dst/favicon.png b/demo/dst/favicon.png new file mode 100644 index 0000000..4c22246 Binary files /dev/null and b/demo/dst/favicon.png differ diff --git a/demo/dst/index.html b/demo/dst/index.html new file mode 100644 index 0000000..bfc86b6 --- /dev/null +++ b/demo/dst/index.html @@ -0,0 +1,37 @@ + + + + + + +Here are some board games I like:
+Play them with me, thanks.
+ + diff --git a/demo/dst/lists/movies.html b/demo/dst/lists/movies.html new file mode 100644 index 0000000..496e0d1 --- /dev/null +++ b/demo/dst/lists/movies.html @@ -0,0 +1,38 @@ + + + + + + +Here are my favorite movies
+I hope you enjoyed this insightful article.
+ + diff --git a/demo/dst/rss.xml b/demo/dst/rss.xml new file mode 100644 index 0000000..34d2e0a --- /dev/null +++ b/demo/dst/rss.xml @@ -0,0 +1,39 @@ + +