diff --git a/src/templates/article.html b/src/templates/article.html index a1bb30e..8c8a478 100644 --- a/src/templates/article.html +++ b/src/templates/article.html @@ -96,7 +96,7 @@ diff --git a/src/templates/article_translation.html b/src/templates/article_translation.html index 3552444..358f39a 100644 --- a/src/templates/article_translation.html +++ b/src/templates/article_translation.html @@ -72,7 +72,7 @@ diff --git a/stsg/build.py b/stsg/build.py index 99ffaeb..dbb9a7a 100644 --- a/stsg/build.py +++ b/stsg/build.py @@ -238,6 +238,7 @@ class ArticleTranslation: self.context["url"] = self.url add_html_link(self.context) self.context["date"] = self.article.modified_at.strftime(config.formatting.datetime_format) + self.context["year"] = str(self.article.modified_at.year) self.context["iso_date"] = self.article.modified_at.isoformat() self.context["author"] = self.article.author @@ -383,6 +384,7 @@ class Article: self.context["url"] = self.url add_html_link(self.context) self.context["date"] = self.modified_at.strftime(config.formatting.datetime_format) + self.context["year"] = str(self.modified_at.year) self.context["iso_date"] = self.modified_at.isoformat() self.context["author"] = self.author diff --git a/stsg/definitions.py b/stsg/definitions.py index 8f2d4cd..6216d2f 100644 --- a/stsg/definitions.py +++ b/stsg/definitions.py @@ -15,6 +15,7 @@ class ArticleContext(TypedDict): url: str link: str date: str + year: str iso_date: str author: str @@ -39,6 +40,7 @@ class ArticleTranslationContext(TypedDict): url: str link: str date: str + year: str iso_date: str author: str