diff --git a/src/templates/article_translation.html b/src/templates/article_translation.html
index 8052579..3552444 100644
--- a/src/templates/article_translation.html
+++ b/src/templates/article_translation.html
@@ -23,6 +23,19 @@
+ {% if breadcrumbs|length %}
+
+
diff --git a/stsg/build.py b/stsg/build.py
index 7477473..99ffaeb 100644
--- a/stsg/build.py
+++ b/stsg/build.py
@@ -246,6 +246,7 @@ class ArticleTranslation:
# get children
self.context["children"] = self.article.child_articles.get_translated(self.language_code).context
+ self.context["breadcrumbs"] = ArticleList(self.article.article_path).get_translated(self.language_code).context
def __init_content_context__(self):
template = jinja2.Template(self.html_content)
@@ -388,6 +389,7 @@ class Article:
# recursive context structures
self.context["translations"] = [c.context for c in self.article_translations_list]
self.context["children"] = self.child_articles.context
+ self.context["breadcrumbs"] = [b.context for b in self.article_path]
for lang, article in self.article_translations_map.items():
self.context[lang] = article.context
@@ -448,6 +450,7 @@ def build():
tree.__init_context__()
tree.__init_content_context__()
+ """
import json
with Path("context.json").open("w") as f:
json.dump(tree.context, f, indent=4)
@@ -455,6 +458,7 @@ def build():
json.dump(CROSS_ARTICLE_CONTEXT, f, indent=4)
with Path("t_cross_article_context.json").open("w") as f:
json.dump(TRANSLATED_CROSS_ARTICLE_CONTEXT, f, indent=4)
-
+ """
+
logger.info("dumping page tree...")
tree.build()
diff --git a/stsg/definitions.py b/stsg/definitions.py
index 838452f..8f2d4cd 100644
--- a/stsg/definitions.py
+++ b/stsg/definitions.py
@@ -20,6 +20,7 @@ class ArticleContext(TypedDict):
translations: List[ArticleTranslationContext]
children: List[ArticleContext]
+ breadcrumbs: List[ArticleContext]
linked: List[ArticleContext]
related: List[ArticleContext]
@@ -50,6 +51,7 @@ class ArticleTranslationContext(TypedDict):
config.fall_back_to_overview_in_translation = False
"""
children: List[Union[ArticleTranslationContext, ArticleContext]]
+ breadcrumbs: List[Union[ArticleTranslationContext, ArticleContext]]
# you can't use these within the markdown text itself
content: str