Compare commits

...

2 Commits

5 changed files with 14 additions and 2 deletions

5
app.py
View File

@ -102,7 +102,10 @@ env.filters["prettydate"] = prettydate
# translate a single file into HTML
def render_single_file(page, path, dist, name = False):
name = Path(path).stem
template = env.select_template([f"{name}.jinja", "index.jinja"])
template_name = name
if "template" in page:
template_name = page["template"]
template = env.select_template([f"{template_name}.jinja", "index.jinja"])
html = template.render(documents=documents, page=page, name=name)
if not os.path.exists(dist):

View File

@ -1,6 +1,7 @@
---
title: A newsletter for december
published: false
template: newsletter
---
# Klankbord Digest January 2025

View File

@ -2,5 +2,6 @@
title: The newsletters
published: false
nested: 'newsletters'
---
Klank.school newsletters

View File

@ -1,3 +1,9 @@
---
title: Klankbord Digest February 2025
published: false
template: newsletter
---
# Klankbord Digest February 2025
## Recent Events

View File

@ -23,6 +23,7 @@
max-width: 800px;
margin: 2rem auto;
font-family: sans-serif;
padding: 12px;
}
</style>
{% block title %}
@ -38,7 +39,7 @@
</head>
</head>
<body>
settings for newssletter only {{ name }}
<main>
<section>
<article>