Skip to main content

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.

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 details)

Uploaded Source

File details

Details for the file lilypad-2.0.0.tar.gz.

File metadata

  • Download URL: lilypad-2.0.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for lilypad-2.0.0.tar.gz
Algorithm Hash digest
SHA256 8765437b15518b8fc2ae5bc05e4645e6f43aa0303d7d6e1963f996cf159655c6
MD5 4f310c11c413268f9059fd06ca0ceb6b
BLAKE2b-256 630550857ab6e0e5357e64b80f348a899981b1de613aed0f6e3081217d93c005

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page