diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index ac745be..1f87f8d 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -196,10 +196,14 @@ export default withMermaid({ if (title !== 'Mediabunny') { title += ' | Mediabunny'; } + const canonicalUrl = `https://mediabunny.dev/${pageData.relativePath}` + .replace(/index\.md$/, '') + .replace(/\.md$/, ''); ((pageData.frontmatter['head'] ??= []) as HeadConfig[]).push( ['meta', { property: 'og:title', content: title }], ['meta', { property: 'twitter:title', content: title }], + ['link', { rel: 'canonical', href: canonicalUrl }], ); }, }); diff --git a/examples/file-compression/index.html b/examples/file-compression/index.html index d543dae..43a5ec3 100644 --- a/examples/file-compression/index.html +++ b/examples/file-compression/index.html @@ -9,6 +9,7 @@ +
diff --git a/examples/hls-transcoding/index.html b/examples/hls-transcoding/index.html index 1b073fa..0187730 100644 --- a/examples/hls-transcoding/index.html +++ b/examples/hls-transcoding/index.html @@ -9,6 +9,7 @@ + diff --git a/examples/live-recording/index.html b/examples/live-recording/index.html index 5dcea29..d550fdf 100644 --- a/examples/live-recording/index.html +++ b/examples/live-recording/index.html @@ -9,6 +9,7 @@ + diff --git a/examples/media-player/index.html b/examples/media-player/index.html index 6f3ff31..e025918 100644 --- a/examples/media-player/index.html +++ b/examples/media-player/index.html @@ -9,6 +9,7 @@ + diff --git a/examples/metadata-extraction/index.html b/examples/metadata-extraction/index.html index edc38fa..94b9bb7 100644 --- a/examples/metadata-extraction/index.html +++ b/examples/metadata-extraction/index.html @@ -9,6 +9,7 @@ + diff --git a/examples/procedural-generation/index.html b/examples/procedural-generation/index.html index 6e9055c..b749050 100644 --- a/examples/procedural-generation/index.html +++ b/examples/procedural-generation/index.html @@ -9,6 +9,7 @@ + diff --git a/examples/thumbnail-generation/index.html b/examples/thumbnail-generation/index.html index bea9d1a..80b7eb1 100644 --- a/examples/thumbnail-generation/index.html +++ b/examples/thumbnail-generation/index.html @@ -9,6 +9,7 @@ +