|
|
@ -3,6 +3,27 @@
|
|
|
|
# TODO: Add a comment block at the top of the script, describing what it does.
|
|
|
|
# TODO: Add a comment block at the top of the script, describing what it does.
|
|
|
|
# TODO: Add a '-h' or '--help' flag, that displays information about the script, and how to use it.
|
|
|
|
# TODO: Add a '-h' or '--help' flag, that displays information about the script, and how to use it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# sitegen / s4g
|
|
|
|
|
|
|
|
# -------------
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
# This is a static-site generator, that can be used to convert Markdown files into HTML.
|
|
|
|
|
|
|
|
# It is extremely simple and extremely opinionated, as you can see if you read the code below.
|
|
|
|
|
|
|
|
# A lot of paths and directories are hard-coded, to suit my workflow.
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
# To use it, create a directory for your project (e.g. 'website'). Inside 'website', create
|
|
|
|
|
|
|
|
# two directories: 'source' (which holds your Markdown files) and 'output' (which holds the
|
|
|
|
|
|
|
|
# converted CSS.
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
# In addition to these directories, three files are needed in 'website':
|
|
|
|
|
|
|
|
# 1. 'header.html' - A header, which is prepended to every source file. Unfortunately, this must
|
|
|
|
|
|
|
|
# be written in regular HTML.
|
|
|
|
|
|
|
|
# 2. 'footer.html' - A footer, which is appended to every source file. Also must be written in HTML.
|
|
|
|
|
|
|
|
# 3. 'styles.css' - A global stylesheet.
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
# If you have any comments or questions, please email aadhavan@twomorecents.org.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
set -o errexit # Stop executing when a command fails
|
|
|
|
set -o errexit # Stop executing when a command fails
|
|
|
|
set -o nounset # Stop executing when accessing an unset variable
|
|
|
|
set -o nounset # Stop executing when accessing an unset variable
|
|
|
|
set -o pipefail # Treat a pipeline as failing, even if one command in the pipeline fails
|
|
|
|
set -o pipefail # Treat a pipeline as failing, even if one command in the pipeline fails
|
|
|
|