From 6f4927406074bc7e8bf1aa1fc992095cf8c04337 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Wed, 7 Jan 2026 10:57:20 -0800 Subject: [PATCH 1/2] do not change title to be titled --- pcweb/pages/gallery/apps.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pcweb/pages/gallery/apps.py b/pcweb/pages/gallery/apps.py index 41237143f..b8f7b88e4 100644 --- a/pcweb/pages/gallery/apps.py +++ b/pcweb/pages/gallery/apps.py @@ -50,9 +50,7 @@ def load_all_gallery_apps(): paths = flexdown.utils.get_flexdown_files(folder) for path in sorted(paths, reverse=True): document = flexdown.Document.from_file(path) # This has metadata - document.metadata["title"] = ( - document.metadata.get("title", "Untitled").replace("_", " ").title() - ) + document.metadata["title"] = document.metadata.get("title", "Untitled") clean_path = str(path).replace(".md", "/") gallery_apps[(clean_path, folder)] = document return gallery_apps From 692dca039d651621d2506cfbf34c4bb513d7c130 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Wed, 7 Jan 2026 11:50:00 -0800 Subject: [PATCH 2/2] use same slug calculation for building links and routes in gallery apps --- pcweb/components/code_card.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pcweb/components/code_card.py b/pcweb/components/code_card.py index 5fa022d01..055e2abab 100644 --- a/pcweb/components/code_card.py +++ b/pcweb/components/code_card.py @@ -1,3 +1,5 @@ +import re + import reflex as rx import reflex_ui as ui from reflex.experimental.client_state import ClientStateVar @@ -107,6 +109,7 @@ def code_card(app: dict) -> rx.Component: def gallery_app_card(app: dict[str, str]) -> rx.Component: + slug = re.sub(r"[\s_]+", "-", app["title"]).lower() return rx.flex( rx.box( rx.link( @@ -116,7 +119,7 @@ def gallery_app_card(app: dict[str, str]) -> rx.Component: alt="Image preview for app: " + app["title"], class_name="size-full duration-150 object-cover hover:scale-105 transition-transform ease-out", ), - href=f"/docs/getting-started/open-source-templates/{app['title'].replace(' ', '-').lower()}", + href=f"/docs/getting-started/open-source-templates/{slug}", ), class_name="relative border-slate-5 border-b border-solid w-full overflow-hidden h-[180px]", ),