From b3e23a53d9fa53ed3a2dad2a58b74048c766b2f3 Mon Sep 17 00:00:00 2001 From: Lars Noack Date: Thu, 17 Apr 2025 14:39:14 +0200 Subject: [PATCH] feat: added children to context --- stsg/build.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stsg/build.py b/stsg/build.py index bf4caeb..b97d6c2 100644 --- a/stsg/build.py +++ b/stsg/build.py @@ -161,6 +161,9 @@ class ArticleTranslation: self.context["content"] = html_content self.context["preview"] = get_preview_text(html_string=html_content) + # get children + self.context["children"] = [c.article_translations_map[self.language_code].context for c in self.article.child_articles if self.language_code in c.article_translations_map] + def build(self): self.dist_path.mkdir(parents=True, exist_ok=True)