Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion app/sitemap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ import { getAllPagesWithTranslations } from "@/lib/i18n/translationRegistry"
export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
const pages = await getAllPagesWithTranslations()

const entries: MetadataRoute.Sitemap = []
const entries: MetadataRoute.Sitemap = [
{
url: "https://ethereum.org/",
changeFrequency: "daily",
priority: 1.0,
lastModified: new Date(),
},
]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't we add one entry per locale as the other urls?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @pettinarip @minimalsm - here are the guidelines for adding locales to sitemap: https://developers.google.com/search/docs/specialty/international/localized-versions

  • Only need the hreflang relationship identified on one source (HTML, HTTP header, or sitemap)
  • If hreflang tags exist in either the HTML or HTTP header, include one url entry per locale in sitemap with tags to improve discovery


for (const { slug, translatedLocales } of pages) {
const normalizedSlug = slug.startsWith("/") ? slug : `/${slug}`
Expand Down