aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorhistoria <gravel.justness270@slmail.me>2024-10-09 19:24:43 -0400
committerhistoria <gravel.justness270@slmail.me>2024-10-09 19:24:43 -0400
commit85cc20507d3541b62d06ec60ad0dc719b6244966 (patch)
tree606d44a8f5f98000e99511157ac34b72a0832dc6 /README.md
parent1d0207d2b818f2388553f218133803583b559b39 (diff)
downloadssg-blog-85cc20507d3541b62d06ec60ad0dc719b6244966.tar.gz
Initial commit
Diffstat (limited to 'README.md')
-rw-r--r--README.md41
1 files changed, 40 insertions, 1 deletions
diff --git a/README.md b/README.md
index ef54896..1e48f8c 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,42 @@
# ssg-blog
-A minor modification to the 'ssg' bash script to generate a simple blog \ No newline at end of file
+This is a modification to the simple static site generator '[ssg](https://romanzolotarev.com/bin/ssg)' by Roman Zolotarev. This generates a minimal blog index page with category headings.
+
+# Install / Usage
+
+See [https://romansolotarev.com/ssg.html](https://romanzolotarev.com/ssg.html) for documentation on ssg
+
+In short:
+1. Install [lowdown](https://kristaps.bsd.lv/lowdown/)
+2. Copy the `ssg` script somewhere in your path, e.g. `/usr/bin/`
+3. `chmod +x /usr/bin/ssg`
+4. `ssg src dst 'my-website-name' '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 needs frontmatter including the title and a YYYY-MM-DD date like this to be included in the index page:
+
+```markdown
+---
+title: My Blog Post
+date: 2024-10-09
+---
+```
+
+## Example
+
+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). Note how articles can be nested in subdirectories or not and that the articles titled index.md get links created without .html appended. This was the command used to generate the example output:
+
+```
+./ssg-blog example/src example/dst 'example-site-name' 'https://example.org'
+```
+
+## 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 |
+```
+
+# Alternatives
+
+You might also be interested in the similar fork [fmash16/ssg5](https://github.com/fmash16/ssg5) which generates a more traditional blog with pagination, keywords, and post previews.