Skip to content

Commit e2739f4

Browse files
committed
Add tags to posts metadata for templates
1 parent aeeca59 commit e2739f4

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes to the genja project are documented in this file. The format of this changelog is based on [Keep a Changelog](https://keepachangelog.com). This project adheres to [Calendar Versioning](https://calver.org) based on `YY.MM.MICRO`.
44

5+
## Genja v25.3
6+
7+
#### Added
8+
9+
- Tags from posts' metadata are passed to templates
10+
511
## Genja v25.2
612

713
#### Changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "genja"
3-
version = "25.2"
3+
version = "25.3"
44
authors = [{name = "Gavin Wiggins"}]
55
description = "Static site generator for GitHub Pages"
66
readme = "README.md"

src/genja/builder.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ def _build_posts(
6161
# Get meta data from the Markdown file
6262
meta = mdown.Meta # pyright: ignore
6363
title = meta["title"][0]
64+
tags = meta["tags"][0]
6465
long_date = meta["date"][0]
6566
iso_date = datetime.strptime(meta["date"][0], "%B %d, %Y").isoformat() + "Z"
6667

@@ -69,6 +70,7 @@ def _build_posts(
6970
"title": title,
7071
"date": long_date,
7172
"category": category,
73+
"tags": tags,
7274
"link": link,
7375
"url": url,
7476
"iso_date": iso_date,

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)