Skip to content

docs: add guide on locale aliases and SEO for gt-next#92

Open
moss-bryophyta wants to merge 1 commit intomainfrom
guides/locale-aliases
Open

docs: add guide on locale aliases and SEO for gt-next#92
moss-bryophyta wants to merge 1 commit intomainfrom
guides/locale-aliases

Conversation

@moss-bryophyta
Copy link
Copy Markdown
Collaborator

Adds a new guide under Next.js → Advanced Integration covering:

  • Setting up customMapping in gt.config.json for locale aliases (e.g. cnzh)
  • Using resolveCanonicalLocale() via getGTClass from gt-next/server to ensure BCP 47 compliance in:
    1. <html lang> attribute
    2. Metadata alternate links (hreflang)
    3. Sitemap xhtml:link alternates
  • Common mistakes table
  • Links to relevant API docs

Also updates meta.json to include the new guide in the sidebar.

Requested by Ernest.

@moss-bryophyta moss-bryophyta requested a review from a team as a code owner March 4, 2026 19:44
@moss-bryophyta moss-bryophyta enabled auto-merge (squash) March 4, 2026 19:44
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