logic path

This commit is contained in:
m
2026-03-22 09:21:50 +01:00
parent 034d9bc884
commit acc9710991
2 changed files with 11 additions and 3 deletions

View File

@@ -48,14 +48,20 @@ def load_snippet(filename):
def get_enriched_post(post_id, BLOG_POSTS):
post = next((p for p in BLOG_POSTS if p.get('id') == post_id), None)
if not post:
return None
from pathlib import Path
BASE_DIR = Path(__file__).resolve().parent.parent
DATA_DIR = BASE_DIR / "content" / "data"
file_path_10 = DATA_DIR / "post_10_timeline.html"
# Mapping config: keeps logic.py tiny
configs = {
10: {
"template": "components/timeline.html",
"timeline_file": "post_10_timeline.html"
"timeline_file": file_path_10
},
8: {
"template": "components/christmas_post.html",