Stupid Simple Static Site Starter
IMPORTANT: SSSSS requires that a markdown renderer be installed, and be executable from a shell as 'markdown'. SSSSS assumes that the renderer will only render exactly what is in the file, and not add anything like <body> tags.
In addition to this assumption, SSSSS assumes that
will output the generated html to stdout.
EQUALLY IMPORTANT: SSSSS assumes that it can use 'sh' in both scripts and 'cat' be available in s5-render.py . What this means is that this won't work on Windows. I don't really care about this, and wont fix it personally. I wrote this as a quick and dirty tool for myself, and I don't use Windows for anything other than the occasional gaming. If somebody else wants to add Windows support, open a PR and I'll probably merge it.
LESS IMPORTANT, BUT STILL IMPORTANT: Many (most?) sites may still require some sort of manual modification in order to add things like tabbing at the top. This tool is not a all in one site generater, but simply a helper tool to remove some of the drudge work in setting up a simple site. I may further extend this to the point where it does do some more things automatically, but this is subject to my time/interest.
##About This program will take a directory structure consisting of directories with images and markdown files and render it to an html website.
The top level directory will include templates for:
When SSSSS renders a given Markdown file it will place the templates and markdown in this order:
There must be exactly one markdown file in each directory of the structure that SSSSS is called on. SSSSS will take this:
DemoSite |- html-header.html |- document-header.html |- footer.html |-top | |- index.md | |-about | | |- about.md | |-blog | | |- blog.md | |-other | | |- other.md
and turn it to:
DemoSite |- html-header.html |- document-header.html |- footer.html |-top | |- index.md | |- index.html | |-about | | |- about.md | | |- index.html | |-blog | | |- blog.md | | |- index.html | |-other | | |- other.md | | |- index.html
Although it seems strange that it would render every markdown file to a file called index.html, there are actually two reasons. First, it allows you to have nice looking URI's without needing to do any extra configuration in your webserver. Second, it allows for less and simpler code, which makes this easier to hack on for anyone who feels interested.
So you read through all that and still want to try this out? Cool. Start by cloning this repository. After you have cloned the repository, move the scripts s5-generate.sh and s5-render.py into your path somewhere.
Next, run s5-generate.sh HelloWorld
This will create a new site called, you guessed it, HelloWorld. Move into the HelloWorld Directory you just created, you should see the template files mentioned above, and a directory called top. The interior of top is where your site will start.