1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
from __future__ import annotations from dataclasses import dataclass from pathlib import Path ARTICLE_TYPES = ["Life", "Photo", "Link", "Quote", "Tech"] @dataclass class Article: slug: str lang: str # "it" | "en" path: Path frontmatter: dict has_translation: bool translation_path: Path | None