diff options
author | Starfall <us@starfall.systems> | 2023-12-05 09:59:19 -0600 |
---|---|---|
committer | Starfall <us@starfall.systems> | 2023-12-05 10:03:27 -0600 |
commit | 90058697439ee3f048f0f42b61ca5ea677e9b5cc (patch) | |
tree | 60b61ef629551112f2e78c6a25c814703dce72f7 /strike/README | |
parent | a43a3e0c273e50d30561328f090d2fad249c7dd6 (diff) |
strike: merge as subdir
Diffstat (limited to 'strike/README')
-rw-r--r-- | strike/README | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/strike/README b/strike/README new file mode 100644 index 0000000..dd6448e --- /dev/null +++ b/strike/README @@ -0,0 +1,56 @@ + _____ __ _ __ + / ___// /______(_) /_____ + \__ \/ __/ ___/ / //_/ _ \ + ___/ / /_/ / / / ,< / __/ +/____/\__/_/ /_/_/|_|\___/ +============================ + +A static site generator that does exactly what we need it to and no more. + +(c) 2021 Starfall <starfall.systems>, all rights reserved until I decide it's in a good enough state for others to use. + +Strike has simple goals: +1. Read HTML page contents from files in the source folder +2. Add boilerplate (head, header, footer, etc) +3. Save to output folder + +And some stretch goals: + * Create an extra page listing all generated pages in order of creation date (newest first) + * As above, but as an RSS feed + * Add links to next & previous generated pages + * Turn the extra page into a flexible component that can be added into any other page + * Use different templates on different files + * Markup parsing (see below) + * More robust created/modified date handling - needs more specification (markup changes vs. template changes, caching original creation date because posix systems don't actually provide that, etc.) + +strike.ini file +--------------- + +Strike should be passed the location of a .ini file or a directory containing a file named strike.ini. This is a text file in Python's configparser format (for now). You can see an example config file with all supported options at sample/strike.ini. + +Markup +------ + +TBD. No markup is used at the moment. + +reStructuredText fulfills most of our desires: https://docutils.sourceforge.io/rst.html +It generates <section>s and has specific markup for page titles. + +Templating +---------- + +TBD. + +Right now, templates are just passed to Python's str.format(). You can use these variables by default: + +{content} : Complete file contents. +{meta[title]} : Filename, with extension dropped. +{meta[date]} : File modification date, in HTTP header format (e.g. "Sat, 23 Oct 2021 18:28:37 GMT") + +Front matter +------------ + +* Front matter is indicated by starting a file with a line that contains exactly three dashes and nothing else ("---\n"). +* Front matter is closed by another line that containts exactly three dashes and nothing else. +* Every line between the opening and closing line should be key=value pairs. +* Front matter is stored into the 'meta' dict, so you can overwrite meta[title] or meta[date] if you want to. |