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`). The filename must fit the format
`YYYY-MM-DD_some-title`.
This post:
_src/markdown_blog/rants/2016-11-05_i-really-love-halloween.md
...would belong to the `rants` category, and would be rendered to
`blog/rants/2016-11-05_i-really-love-halloween.html`. The above
post would have a timestamp of 2016-11-05.
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`). The filename must fit the format
`YYYY-MM-DD_some-title`.
This post:
_src/markdown_blog/rants/2016-11-05_i-really-love-halloween.md
...would belong to the `rants` category, and would be rendered to
`blog/rants/2016-11-05_i-really-love-halloween.html`. The above
post would have a timestamp of 2016-11-05.
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-2.0.0.tar.gz
(3.8 kB
view hashes)