Fix canonical for tags and categories

This commit is contained in:
prototypa
2022-11-03 01:13:49 +01:00
parent be569c11f8
commit bacbb86e20
2 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@ const currentPage = page.currentPage ?? 1;
const meta = {
title: `Category '${category}' ${currentPage > 1 ? `— Page ${currentPage} ` : ''}— ${SITE.name}`,
description: SITE.description,
canonical: getCanonical(getPermalink(page.url.current)),
canonical: getCanonical(getPermalink(category, "category")),
noindex: true,
};
---

View File

@ -37,7 +37,7 @@ const currentPage = page.currentPage ?? 1;
const meta = {
title: `Posts by tag '${tag}' ${currentPage > 1 ? `— Page ${currentPage} ` : ''}— ${SITE.name}`,
description: SITE.description,
canonical: getCanonical(getPermalink(page.url.current)),
canonical: getCanonical(getPermalink(tag, "tag")),
noindex: true
};
---