Skip to content

feat: refresh document title on language switch - #106

Merged
Flash303 merged 1 commit into
mainfrom
dev
Oct 11, 2026
Merged

Flash303 merged 1 commit into
mainfrom
dev

Conversation

@Flash303

Copy link
Copy Markdown
Owner

This pull request introduces a new mechanism for synchronizing client-side document metadata (title and meta tags) with the current route and language, improving SEO and user experience. It standardizes how page metadata is defined and applied across the app, and refactors all major pages to use this new system.

Client-side document meta synchronization:

  • Added a new DocumentMetaSync component that automatically applies the correct title and meta descriptions on the client by traversing route handles for a getDocumentMeta function. This ensures metadata stays up-to-date with navigation and language changes. (frontend/app/ui/layout/DocumentMetaSync.tsx, frontend/app/ui/layout/index.tsx) [1] [2]

Metadata definition and application API:

  • Introduced DocumentMeta and RouteMetaHandle types, and an applyDocumentMeta function to standardize and simplify how pages declare and apply their metadata. (frontend/app/core/lib/seo-meta.ts)

Page-level refactoring to use new metadata system:

  • Refactored all main pages (Home, Compare, LegalNotice, Privacy, Terms, ServerDetail) to export a handle with a getDocumentMeta function, and to use the new DocumentMeta structure for metadata. This replaces ad hoc or inline meta tag generation. (frontend/app/pages/home/index.tsx, frontend/app/pages/compare/index.tsx, frontend/app/pages/LegalNotice.tsx, frontend/app/pages/Privacy.tsx, frontend/app/pages/Terms.tsx, frontend/app/pages/server-detail/index.tsx) [1] [2] [3] [4] [5] [6] [7] [8]

Code cleanup and documentation:

  • Removed outdated or redundant comments and docstrings from seo-meta.ts to streamline the code and documentation. [1] [2] [3]

Type and import updates:

  • Updated type imports and usages throughout affected files to support the new metadata system. [1] [2] [3] [4] [5] [6]

This refactor lays the groundwork for robust, language-aware SEO and consistent metadata management across the application.

@Flash303
Flash303 merged commit 2cf2555 into main Oct 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant