mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-10-02 21:33:52 +02:00
Add link rel="canonical"
This commit is contained in:
@@ -196,10 +196,14 @@ export default withMermaid({
|
|||||||
if (title !== 'Mediabunny') {
|
if (title !== 'Mediabunny') {
|
||||||
title += ' | Mediabunny';
|
title += ' | Mediabunny';
|
||||||
}
|
}
|
||||||
|
const canonicalUrl = `https://mediabunny.dev/${pageData.relativePath}`
|
||||||
|
.replace(/index\.md$/, '')
|
||||||
|
.replace(/\.md$/, '');
|
||||||
|
|
||||||
((pageData.frontmatter['head'] ??= []) as HeadConfig[]).push(
|
((pageData.frontmatter['head'] ??= []) as HeadConfig[]).push(
|
||||||
['meta', { property: 'og:title', content: title }],
|
['meta', { property: 'og:title', content: title }],
|
||||||
['meta', { property: 'twitter:title', content: title }],
|
['meta', { property: 'twitter:title', content: title }],
|
||||||
|
['link', { rel: 'canonical', href: canonicalUrl }],
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
<script type="module" src="./file-compression.ts"></script>
|
<script type="module" src="./file-compression.ts"></script>
|
||||||
<link rel="stylesheet" href="../base.css">
|
<link rel="stylesheet" href="../base.css">
|
||||||
<link rel="icon" href="../../docs/public/mediabunny-logo.svg">
|
<link rel="icon" href="../../docs/public/mediabunny-logo.svg">
|
||||||
|
<link rel="canonical" href="https://mediabunny.dev/examples/file-compression/">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="flex flex-col items-center py-10 bg-zinc-50 text-zinc-800 dark:bg-zinc-900 dark:text-zinc-200 px-2">
|
<body class="flex flex-col items-center py-10 bg-zinc-50 text-zinc-800 dark:bg-zinc-900 dark:text-zinc-200 px-2">
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
<script type="module" src="./hls-transcoding.ts"></script>
|
<script type="module" src="./hls-transcoding.ts"></script>
|
||||||
<link rel="stylesheet" href="../base.css">
|
<link rel="stylesheet" href="../base.css">
|
||||||
<link rel="icon" href="../../docs/public/mediabunny-logo.svg">
|
<link rel="icon" href="../../docs/public/mediabunny-logo.svg">
|
||||||
|
<link rel="canonical" href="https://mediabunny.dev/examples/hls-transcoding/">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="flex flex-col items-center bg-zinc-50 px-2 py-10 text-zinc-800 dark:bg-zinc-900 dark:text-zinc-200">
|
<body class="flex flex-col items-center bg-zinc-50 px-2 py-10 text-zinc-800 dark:bg-zinc-900 dark:text-zinc-200">
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
<script type="module" src="./live-recording.ts"></script>
|
<script type="module" src="./live-recording.ts"></script>
|
||||||
<link rel="stylesheet" href="../base.css">
|
<link rel="stylesheet" href="../base.css">
|
||||||
<link rel="icon" href="../../docs/public/mediabunny-logo.svg">
|
<link rel="icon" href="../../docs/public/mediabunny-logo.svg">
|
||||||
|
<link rel="canonical" href="https://mediabunny.dev/examples/live-recording/">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="flex flex-col items-center py-10 bg-zinc-50 text-zinc-800 dark:bg-zinc-900 dark:text-zinc-200 px-2">
|
<body class="flex flex-col items-center py-10 bg-zinc-50 text-zinc-800 dark:bg-zinc-900 dark:text-zinc-200 px-2">
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
<script type="module" src="./media-player.ts"></script>
|
<script type="module" src="./media-player.ts"></script>
|
||||||
<link rel="stylesheet" href="../base.css">
|
<link rel="stylesheet" href="../base.css">
|
||||||
<link rel="icon" href="../../docs/public/mediabunny-logo.svg">
|
<link rel="icon" href="../../docs/public/mediabunny-logo.svg">
|
||||||
|
<link rel="canonical" href="https://mediabunny.dev/examples/media-player/">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="flex flex-col items-center py-10 bg-zinc-50 text-zinc-800 dark:bg-zinc-900 dark:text-zinc-200 px-2 h-svh">
|
<body class="flex flex-col items-center py-10 bg-zinc-50 text-zinc-800 dark:bg-zinc-900 dark:text-zinc-200 px-2 h-svh">
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
<script type="module" src="./metadata-extraction.ts"></script>
|
<script type="module" src="./metadata-extraction.ts"></script>
|
||||||
<link rel="stylesheet" href="../base.css">
|
<link rel="stylesheet" href="../base.css">
|
||||||
<link rel="icon" href="../../docs/public/mediabunny-logo.svg">
|
<link rel="icon" href="../../docs/public/mediabunny-logo.svg">
|
||||||
|
<link rel="canonical" href="https://mediabunny.dev/examples/metadata-extraction/">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="flex flex-col items-center py-10 bg-zinc-50 text-zinc-800 dark:bg-zinc-900 dark:text-zinc-200 px-2">
|
<body class="flex flex-col items-center py-10 bg-zinc-50 text-zinc-800 dark:bg-zinc-900 dark:text-zinc-200 px-2">
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
<script type="module" src="./procedural-generation.ts"></script>
|
<script type="module" src="./procedural-generation.ts"></script>
|
||||||
<link rel="stylesheet" href="../base.css">
|
<link rel="stylesheet" href="../base.css">
|
||||||
<link rel="icon" href="../../docs/public/mediabunny-logo.svg">
|
<link rel="icon" href="../../docs/public/mediabunny-logo.svg">
|
||||||
|
<link rel="canonical" href="https://mediabunny.dev/examples/procedural-generation/">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="flex flex-col items-center py-10 bg-zinc-50 text-zinc-800 dark:bg-zinc-900 dark:text-zinc-200 px-2">
|
<body class="flex flex-col items-center py-10 bg-zinc-50 text-zinc-800 dark:bg-zinc-900 dark:text-zinc-200 px-2">
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
<script type="module" src="./thumbnail-generation.ts"></script>
|
<script type="module" src="./thumbnail-generation.ts"></script>
|
||||||
<link rel="stylesheet" href="../base.css">
|
<link rel="stylesheet" href="../base.css">
|
||||||
<link rel="icon" href="../../docs/public/mediabunny-logo.svg">
|
<link rel="icon" href="../../docs/public/mediabunny-logo.svg">
|
||||||
|
<link rel="canonical" href="https://mediabunny.dev/examples/thumbnail-generation/">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="flex flex-col items-center py-10 bg-gray-50 text-gray-800 dark:bg-zinc-900 dark:text-zinc-200 px-2">
|
<body class="flex flex-col items-center py-10 bg-gray-50 text-gray-800 dark:bg-zinc-900 dark:text-zinc-200 px-2">
|
||||||
|
|||||||
Reference in New Issue
Block a user