From 75161fe950788ed06badb935ce8986f3cd6a8177 Mon Sep 17 00:00:00 2001 From: Dmytro Demchenko Date: Fri, 27 Sep 2024 12:53:46 +0300 Subject: [PATCH] fix: Update canonical URL in Post component (#19) --- src/components/blog-page/Post.astro | 3 +-- ...Setting-up-P2P-video-on-a-web-page-in-5-minutes-for-free.md | 1 + src/content/config.ts | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/blog-page/Post.astro b/src/components/blog-page/Post.astro index f7ffee6..6c19c3b 100644 --- a/src/components/blog-page/Post.astro +++ b/src/components/blog-page/Post.astro @@ -6,10 +6,9 @@ import Layout from "../../layouts/Layout.astro"; import "../../styles/blog.css"; const post = Astro.props.frontmatter ?? Astro.props; -const canonicalUrl = `https://novage.com.ua/blog/${post.slug}`; --- - +
diff --git a/src/content/blog/Setting-up-P2P-video-on-a-web-page-in-5-minutes-for-free.md b/src/content/blog/Setting-up-P2P-video-on-a-web-page-in-5-minutes-for-free.md index 3757156..ecbcbce 100644 --- a/src/content/blog/Setting-up-P2P-video-on-a-web-page-in-5-minutes-for-free.md +++ b/src/content/blog/Setting-up-P2P-video-on-a-web-page-in-5-minutes-for-free.md @@ -1,4 +1,5 @@ --- +canonicalURL: https://novage.com.ua/blog/setting-up-p2p-video-on-a-web-page-in-5-minutes-for-free author: Andriy Lysnevych date: "2019-03-22" title: "Setting up p2p video on a web page in 5 minutes for free" diff --git a/src/content/config.ts b/src/content/config.ts index 3c8ca6f..1274bae 100644 --- a/src/content/config.ts +++ b/src/content/config.ts @@ -3,6 +3,7 @@ import { z, defineCollection } from "astro:content"; const blogCollection = defineCollection({ type: "content", // v2.5.0 and later schema: z.object({ + canonicalURL: z.string().url(), title: z.string(), date: z.string(), description: z.string(),