Skip to content

Commit 72cc189

Browse files
committed
fix build
1 parent 2cb0439 commit 72cc189

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ public/
22
pnpm-lock.yaml
33
*.mdx
44
!src/pages/blog/2024-04-11-announcing-new-graphql-website/index.mdx
5+
*.jpg

src/pages/tags/[slug].mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ export async function getStaticProps({ params }) {
1515
}
1616

1717
export function getStaticPaths() {
18-
const result = getPagesUnderRoute("/blog")
19-
const tags = result.flatMap(item => item.frontMatter.tags)
18+
const items = getPagesUnderRoute("/blog").flatMap(item => item.children || item)
19+
const tags = items.flatMap(item => item.frontMatter.tags)
2020
return {
2121
fallback: false,
2222
paths: [...new Set(tags)].map(slug => ({ params: { slug } })),

0 commit comments

Comments
 (0)