refactoring article context building

This commit is contained in:
Hazel Noack
2025-05-22 13:43:34 +02:00
parent 753de66e08
commit f2a3d7ada4
2 changed files with 56 additions and 25 deletions

View File

@@ -1,4 +1,5 @@
from typing import TypedDict
from __future__ import annotations
from typing import TypedDict, List
class ArticleConfig(TypedDict):
@@ -12,15 +13,27 @@ class ArticleContext(TypedDict):
slug: str
name: str
url: str
link: str
date: str
iso_date: str
author: str
translations: List[ArticleTranslationContext]
children: List[ArticleContext]
linked: List[ArticleContext]
related: List[ArticleContext]
class ArticleTranslationContext(TypedDict):
slug: str
name: str
url: str
link: str
date: str
iso_date: str
author: str
translations: List[ArticleTranslationContext]
children: List[ArticleTranslationContext]
linked: List[ArticleTranslationContext]
related: List[ArticleTranslationContext]