From d6b56e89eab6e39a47a5414952189ae52f7e5810 Mon Sep 17 00:00:00 2001
From: Dominik George <dominik.george@teckids.org>
Date: Sun, 21 Nov 2021 12:40:04 +0100
Subject: [PATCH] Parse language from path for posts

---
 pelican_theme_teckids/pelicanconf.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pelican_theme_teckids/pelicanconf.py b/pelican_theme_teckids/pelicanconf.py
index b43b217..f76ebc4 100644
--- a/pelican_theme_teckids/pelicanconf.py
+++ b/pelican_theme_teckids/pelicanconf.py
@@ -13,7 +13,8 @@ ARTICLE_PATHS = ["posts"]
 PAGE_PATHS = ["pages"]
 STATIC_PATHS = ["static", "images"]
 PATH = "content"
-PATH_METADATA = "pages/(?P<lang>[^/]*)"
+FILENAME_METADATA = r'(?P<date>\d{4}-\d{2}-\d{2})_.*'
+PATH_METADATA = r"(posts|pages)/(?P<lang>[^/]*)"
 OUTPUT_PATH = "public"
 SLUGIFY_SOURCE = "basename"
 
-- 
GitLab