Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
dimaMachina committed Apr 12, 2024
1 parent 2cb0439 commit 72cc189
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ public/
pnpm-lock.yaml
*.mdx
!src/pages/blog/2024-04-11-announcing-new-graphql-website/index.mdx
*.jpg
4 changes: 2 additions & 2 deletions src/pages/tags/[slug].mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export async function getStaticProps({ params }) {
}

export function getStaticPaths() {
const result = getPagesUnderRoute("/blog")
const tags = result.flatMap(item => item.frontMatter.tags)
const items = getPagesUnderRoute("/blog").flatMap(item => item.children || item)
const tags = items.flatMap(item => item.frontMatter.tags)
return {
fallback: false,
paths: [...new Set(tags)].map(slug => ({ params: { slug } })),
Expand Down

0 comments on commit 72cc189

Please sign in to comment.