Fixes canonical blog URL in blog feed

This commit is contained in:
Joe Carstairs
2024-03-30 20:23:30 +00:00
parent 4718d76601
commit c4267702b7

View File

@@ -39,7 +39,7 @@ function sortByPubDateDescending(post1: CollectionEntry<'blog'>, post2: Collecti
const headingElem = `h${headingLevel}`;
const canonicalUrl = new URL(Astro.url.pathname, Astro.site)
const canonicalBlogUrl = new URL('blog', Astro.site)
---
<section class="h-feed">
@@ -55,7 +55,7 @@ const canonicalUrl = new URL(Astro.url.pathname, Astro.site)
</p>
<p>
<a class="u-url" href={canonicalUrl}>Permalink</a>
<a class="u-url" href={canonicalBlogUrl}>Permalink</a>
</p>
</aside>