2026-03-24 21:44:12 +01:00
2026-03-13 19:31:46 +01:00
2026-03-24 21:27:59 +01:00
2026-03-22 09:21:50 +01:00
2026-03-22 20:20:30 +01:00
2026-03-24 21:44:12 +01:00
2026-03-15 13:03:01 +01:00
2026-03-17 09:14:50 +01:00
2026-03-15 09:48:48 +01:00
2026-03-24 21:27:59 +01:00
2026-03-22 09:21:50 +01:00
2026-03-12 21:47:01 +01:00

Flask Blog Templates

A minimal Flask template set for my blog.
This project adapts and the original simple-blog-template by Seunghun Lee. Content is static; selected templates (with fixed names/paths) are loaded dynamically. Initially deployed using uWSGI and Nginx; later migrated to Gunicorn, Caddy, and Docker. Most versions should work.

Git Tag

Current version:

git tag -a v1.0 -m "Initial release of Flask Blog Templates"
(it worked on my machine)

Overview

It provides a growing collection of styling templates and is designed to run with two additional files (see below).

In the current setup, blog content is defined using Python dictionaries (example below), while comments are stored in a CSV file at content/comments.csv.

A basic blog structure is provided by the existing templates. Additional per-article styling can be applied either by embedding raw HTML directly in the post content or by using template expansion via Jinja:

{% if post.template %}
    {% include post.template %}
{% endif %}

For example, templates/components/timeline.html demonstrates a timeline component.

An example data structure is provided below.


Required Files

This two files should be included in program folder to run the app.

content/about.py

provides text for about page and blog title

ABOUT = {
    "content": """
        <p>Hello here is the about page</p>
    """
}

TITLE = {
    "title": "Hello World"
}

content/posts.py

provides articles in blog:

BLOG_POSTS = [
     {
         'id': 7,
         'title': "title",
         'subtitle': "subtitle",
        'date': "December 10, 2024",
         'content': """can use raw html string for style, will be rendered as html
        """,
         'displayall': False
     },
 ]

Template Evolution

  • Originally based on the Simple Blog Template project.

  • Adapted for Jinja2 rendering (Flask compatibility).

  • CSS rewritten for flexibility and modular styling.

  • Template design will continue accumulating for themes and post customization.

License

Description
templates for my blog
Readme 357 KiB
Languages
Python 43.4%
CSS 27.9%
HTML 27.6%
JavaScript 1.1%