Skip to content

Commit

Permalink
Stop passing the entire docs jungle just for the card title + descrip…
Browse files Browse the repository at this point in the history
…tions 😅
  • Loading branch information
simonswiss committed Jul 4, 2024
1 parent bfe71b7 commit b6404a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/pages/docs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -337,14 +337,15 @@ export type DocsArray = {

export async function getStaticProps (): Promise<
GetStaticPropsResult<{
docs: DocsArray
docs: Omit<DocsArray, 'content'> & { content: null }
}>
> {
const docs = await reader.collections.docs.all({ resolveLinkedFiles: true })
const withParsedCardIntro = docs.map((doc) => ({
...doc,
entry: {
...doc.entry,
content: null,
cardIntro: transform(doc.entry.cardIntro.node, baseMarkdocConfig),
},
}))
Expand Down

0 comments on commit b6404a1

Please sign in to comment.