logic path
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user