Change glob

This commit is contained in:
elpekenin
2022-10-16 12:17:36 +02:00
parent 4fbe54450e
commit a256dedb73
7 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -28,7 +28,7 @@ type PagePaths = {
}[];
export async function getStaticPaths() {
const posts = await Astro.glob<Frontmatter>("../../contents/*.md");
const posts = await Astro.glob<Frontmatter>("../../contents/**/*.md");
let postResult: PostResult = posts.map((post) => {
return {
@@ -51,7 +51,7 @@ export async function getStaticPaths() {
const { slug } = Astro.params;
const { post } = Astro.props;
const posts = await Astro.glob<Frontmatter>("../../contents/*.md");
const posts = await Astro.glob<Frontmatter>("../../contents/**/*.md");
const sortedPosts = getSortedPosts(posts);