feat: single-source theme discovery replaces three hardcoded whitelists

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
浅念
2026-10-22 17:14:44 +08:00
parent cd109cf873
commit 204c5039ab
4 changed files with 38 additions and 4 deletions
+1 -2
View File
@@ -13,9 +13,8 @@ from pathlib import Path
from urllib.parse import quote
from jinja2 import Environment, FileSystemLoader, select_autoescape
from markupsafe import Markup
from .core import sanitize, route_path
from .core import sanitize, route_path, THEMES
THEMES=('automotive','industrial','corporate','minimal')
ROOT=Path(__file__).resolve().parent.parent
LOADER=Environment(loader=FileSystemLoader(str(ROOT/'themes')),autoescape=select_autoescape(['html','xml']))