Skip to content

Add Jinja2 Templating Support #113

Open
@miroslavpojer

Description

@miroslavpojer

Background

Our current templating setup (static frontmatter) lacks flexibility. It’s difficult to reuse layout components like headers, titles, and content blocks, and we can't easily inject logic (e.g., conditionals, loops). This results in duplicated code and makes content harder to maintain as the project grows.

Feature

Introduce Jinja2 as a templating engine to support modular, dynamic templates using blocks ({% block content %}), includes, and variable injection. This would allow us to manage layout and content in a more scalable, DRY way.

Example [Optional]

Instead of duplicating full-page layouts, we can do:

{% extends "base.jinja" %}

{% block content %}
  <h1>User Stories</h1>
  <p>The comprehensive list of AqueDuct Project’s User Stories.</p>
{% endblock %}

Proposed Solution

Solution Ideas:

  1. Set up a templates/ folder and add Jinja2 as a dependency.
  2. Add a minimal render.py script to compile .jinja templates into HTML or markdown.
  3. Refactor an existing templates to use a Jinja2 layout.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions