2026-05-26
Template SEO phase 1 foundation landed.
Completed in this phase:
- Added
/topics to localized route recognition in src/i18n/config.ts.
- Added
getLocaleTopicsPath(locale) helper so future agents can compose topic URLs without hardcoding strings.
- Added top-level
/topics redirect to the default locale path.
- Added localized
/[locale]/topics redirect to the current template archive as a temporary base route until topic data exists.
- Corrected legacy redirects that still pointed to
/template/uploaded or the old template root when the canonical archive path is /templates/....
- Updated
app/sitemap.ts so canonical template archive and category entries now emit /templates URLs instead of legacy /template URLs.
- Wrote the implementation plan into
documentation/plan/template-seo-plan.md.
Intentionally not done yet:
- No real
/[locale]/topics/[topicSlug] page yet.
- No topic-to-template mapping layer yet.
- No template permalink route yet.
- No URL-driven modal behavior yet.
- No template permalink sitemap entries yet.
Recommended next handoff order:
- Define a stable topic source of truth in the template data layer.
- Implement
/[locale]/topics/[topicSlug] with server-side metadata.
- Implement
/[locale]/templates/[category]/[slug] as the canonical template permalink.
- Convert modal opening state from local state to route-aware state.
Notes for the next agent:
- The repository still contains legacy
/template/[category] compatibility surfaces. They are no longer canonical, but they were not removed in this phase to avoid widening behavioral risk.
getLocaleTemplatePath(locale) still aliases to /templates for backward compatibility and can be left in place while other call sites migrate.