I built this partly to learn, and partly because I didn't know what type of site I wanted.
I wanted to be able modify the generator as my needs changed and didn't want to install then keep modifying a package.
A script fit the bill.
stic does three things:
- Generates a folder structure, if it doesn't exist already. If you don't have any of folders below, it'll generate it, otherwise leave will leave the folder structure unaltered.
-public
-assets
-templates
-articles
-pages
- Converts all .md files in the articles folder to HTML using a template in templates folder.
- Moves all (converted) HTML files from articles and copies everything from assets & pages to the public folder.
- Python 2.7+
- python-markdown
- jinja2
- Install dependencies:
pip install markdown jinja2
- Copy
stic
to the root folder of your site. i.e. right alongside the public, assets, templates, articles folders. - Make it executable:
chmod +x stic
- Run it:
./stic -t
See all options by:
./stic -h
All markdown files to be converted need to have the extension .md
All templates use jinja and need to have the extension .jinja2