Skip to content

Commit

Permalink
Fix reading time bug on content subfolder
Browse files Browse the repository at this point in the history
  • Loading branch information
mahasak committed Jan 5, 2024
1 parent 6e841ee commit 9067505
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/getPostsWithRT.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { CollectionEntry } from "astro:content";

export const getReadingTime = async () => {
// Get all posts using glob. This is to get the updated frontmatter
const globPosts = import.meta.glob("../content/blog/*.md") as Promise<
const globPosts = import.meta.glob("../content/blog/**/*.md") as Promise<
CollectionEntry<"blog">["data"][]
>;

Expand All @@ -28,4 +28,4 @@ const getPostsWithRT = async (posts: CollectionEntry<"blog">[]) => {
});
};

export default getPostsWithRT;
export default getPostsWithRT;

0 comments on commit 9067505

Please sign in to comment.