Folder2HTML
Goal
Given a folder containing CommonMark files, turn it into HTML.
Requirements
File structure
foo/
detail.html # Jinja2 template for detail
list.html # …for list
feed.xml # …for feed
2017-01-30.md # An item to be generated
hello-world.md # Another one
why-not.md # Filename is not significative
and so one…
Metadata
Each CommonMark file must have the given metadata elements:
title: A title
url: /bar/a-title/
date: 2017-01-30
And then the content.
Parsing with the metadata extension? The thread about that on CommonMark has no conclusion…
Usage
Generate HTML
$ python3 foo
Launch local server
$ python3 -m http.server
Browse it!
$ open http://localhost:8000/bar/a-title/
It seems
From the structure, I see:
Missing things for me (but then we are drifting from your goals of simplicity I guess):