diff --git a/src/components/blog/Tags.astro b/src/components/blog/Tags.astro
index 30b09e25be..ae46a245e8 100644
--- a/src/components/blog/Tags.astro
+++ b/src/components/blog/Tags.astro
@@ -17,13 +17,11 @@ const { tags, class: className = 'text-sm', title = undefined, isCategory = fals
{
tags && Array.isArray(tags) && (
<>
- <>
- {title !== undefined && (
-
- {title}
-
- )}
- >
+ {title !== undefined && (
+
+ {title}
+
+ )}
{tags.map((tag) => (
-
diff --git a/src/utils/frontmatter.ts b/src/utils/frontmatter.ts
index 043710419c..ae80259541 100644
--- a/src/utils/frontmatter.ts
+++ b/src/utils/frontmatter.ts
@@ -1,14 +1,16 @@
import getReadingTime from 'reading-time';
import { toString } from 'mdast-util-to-string';
import { visit } from 'unist-util-visit';
-import type { MarkdownAstroData, RehypePlugin, RemarkPlugin } from '@astrojs/markdown-remark';
+import type { RehypePlugin, RemarkPlugin } from '@astrojs/markdown-remark';
export const readingTimeRemarkPlugin: RemarkPlugin = () => {
return function (tree, file) {
const textOnPage = toString(tree);
const readingTime = Math.ceil(getReadingTime(textOnPage).minutes);
- (file.data.astro as MarkdownAstroData).frontmatter.readingTime = readingTime;
+ if (typeof file?.data?.astro?.frontmatter !== "undefined") {
+ file.data.astro.frontmatter.readingTime = readingTime;
+ }
};
};