Emit a <link rel="alternate"> for the markdown version of a page (#3528)

This commit is contained in:
Samy Pessé
2025-08-06 08:55:02 +02:00
committed by GitHub
parent a862cde6b4
commit cc2e615b9a
2 changed files with 8 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"gitbook": minor
---
Emit a <link rel="alternate"> for the markdown version of a page
@@ -135,6 +135,9 @@ export async function generateSitePageMetadata(props: SitePageProps): Promise<Me
canonical: linker
.toAbsoluteURL(linker.toPathForPage({ pages: revision.pages, page }))
.replace(/\/+$/, ''),
types: {
'text/markdown': `${linker.toAbsoluteURL(linker.toPathInSpace(page.path))}.md`,
},
},
openGraph: {
images: [