diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 10 |
1 files changed, 1 insertions, 9 deletions
@@ -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 <filename>.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 `<h1>` tag and auto-populate the `<title>` 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. |
