jinja2 website with a markdown source blog
Project description
Quick-and-dirty static site generator for Python 3 (exclusively)
using jinja & markdown.
This script generates the lillian.link static website from `_src`.
I really just made this for fun and I knew exactly
what I wanted in a static site generator:
* `jinja2` for templates and pages (`_src/templates/`)
* `markdown` for blog posts (`_src/markdown_blog/`), which can be
categorized simply by organizing the markdown files into directories
How it works:
Every jinja2 template (HTML file) in `_src/templates/pages/`
will be rendered to the project's root (wherever lilypad is
being executed from/current working directory). For the blog,
the following jinja2 templates are required:
* `src_/templates/lilypad/category-index.html
* `src_/templates/lilypad/blog.html
* `src_/templates/lilypad/blog-article.html
The `_src/markdown_blog/` directory is scanned for markdown files
recursively (`*.md`). Metadata, such as creation and modified time,
are obtained through the file's metadata itself, and maintained in
an SQLITE3 database in case the file meta gets changed when copying/
cloining. Files in the `_src/markdown_blog/` directory may be put
into directories, for example:
_src/markdown_blog/rants/i-really-love-halloween.md
...would belong to the `rants` category, and would be rendered to
`blog/rants/i-really-love-halloween.html`. Additionally, indexes
for categories and for the blog front page are generated.
Quickstart:
Just modify some files in `_src` and then run this script!
$ python lilypad.py
If you want to test the site, just do this:
$ python -m http.server 8000
... then open http://localhost/index.html in web browser.
using jinja & markdown.
This script generates the lillian.link static website from `_src`.
I really just made this for fun and I knew exactly
what I wanted in a static site generator:
* `jinja2` for templates and pages (`_src/templates/`)
* `markdown` for blog posts (`_src/markdown_blog/`), which can be
categorized simply by organizing the markdown files into directories
How it works:
Every jinja2 template (HTML file) in `_src/templates/pages/`
will be rendered to the project's root (wherever lilypad is
being executed from/current working directory). For the blog,
the following jinja2 templates are required:
* `src_/templates/lilypad/category-index.html
* `src_/templates/lilypad/blog.html
* `src_/templates/lilypad/blog-article.html
The `_src/markdown_blog/` directory is scanned for markdown files
recursively (`*.md`). Metadata, such as creation and modified time,
are obtained through the file's metadata itself, and maintained in
an SQLITE3 database in case the file meta gets changed when copying/
cloining. Files in the `_src/markdown_blog/` directory may be put
into directories, for example:
_src/markdown_blog/rants/i-really-love-halloween.md
...would belong to the `rants` category, and would be rendered to
`blog/rants/i-really-love-halloween.html`. Additionally, indexes
for categories and for the blog front page are generated.
Quickstart:
Just modify some files in `_src` and then run this script!
$ python lilypad.py
If you want to test the site, just do this:
$ python -m http.server 8000
... then open http://localhost/index.html in web browser.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lilypad-1.0.0.tar.gz
(4.7 kB
view hashes)