Module

cli.templates.blog.template

Blog site template.

Provides a starter blog with a landing page, an about page, and two example posts. Demonstrates how templates can perform simple token substitution (e.g. injecting the current date) when loading bundled content files.

Exported objects:

  • TEMPLATE: the concreteSiteTemplate.

Functions

_load_template_file
Load and lightly render a page from the template's ``pages/`` dir. Replaces ``{{date}}`` placehold…
1 str
def _load_template_file(relative_path: str) -> str

Load and lightly render a page from the template'spages/dir.

Replaces{{date}}placeholders with today's date (YYYY-MM-DD).

Parameters 1

Name Type Default Description
relative_path str

Path inside this template'spages/directory.

Returns

str

The file contents with simple substitutions applied.

_create_blog_template
Construct the blog template definition.
0 SiteTemplate
def _create_blog_template() -> SiteTemplate

Construct the blog template definition.

Returns

SiteTemplate

A :class:SiteTemplatethat scaffolds a minimal blog.