From 4bc7a6d9800feac633a9bd5070d21627ab3eff57 Mon Sep 17 00:00:00 2001 From: Lars Noack Date: Wed, 16 Apr 2025 16:01:38 +0200 Subject: [PATCH] feat: added article translation templating --- src/templates/article_translation.html | 16 +++++----------- stsg/build.py | 1 + 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/templates/article_translation.html b/src/templates/article_translation.html index 8fb16e6..aaecaa3 100644 --- a/src/templates/article_translation.html +++ b/src/templates/article_translation.html @@ -3,7 +3,7 @@ - {article_language_flag} {article_title} + {{language.flag}} {{title}} @@ -14,9 +14,9 @@ aria-label="main navigation" > @@ -24,13 +24,7 @@
- {article_content} - -

Further Reading

- -
- {article_children_cards} -
+ {{content}}
diff --git a/stsg/build.py b/stsg/build.py index c90da8d..31f5181 100644 --- a/stsg/build.py +++ b/stsg/build.py @@ -148,6 +148,7 @@ class ArticleTranslation: self.context["meta"] = self.article.context_meta self.context["url"] = self.url self.context["language"] = LANGUAGES[self.language_code] + self.context["article_url"] = self.article.url html_content = self.file.read_text() if self.file.suffix == ".md":