Skip to content

Commit

Permalink
feat: Add 'with/mdx-docs-nextra' to list of plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
codinsonn committed Apr 20, 2024
1 parent 07a7166 commit da1ab2c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/docs/pages/plugins/[[...pluginBranchSlug]].mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@ export async function getStaticProps({ params }) {
const branchPRs = await response.json()
const branchPR = branchPRs[0]
const branchPRMarkdown = branchPR.body
const branchPRTitle = branchPR.title
console.log(branchPRMarkdown)
const branchPRTitle = branchPR.title?.replace?.('plugin: ', '')
pageMarkdown = branchPRMarkdown.split('\n').reduce((acc, line) => {
let newLine = line
if (line.includes('<img ') && line.includes('">')) newLine = newLine.replace('">', '" />')
return acc + newLine + '\n'
}, `# \`${branchPRTitle}\`\n\n`)
}, `# ${branchPRTitle} \n\n \`\`\`zsch\ngit merge with/${branchName}\n\`\`\`\n\n`)
}
} catch (error) {
if (!error) console.error(error)
Expand All @@ -31,8 +32,7 @@ export async function getStaticProps({ params }) {
props: {
...dynamicMeta,
...dynamicMDX,
},
revalidate: false,
}
}
}

Expand Down
4 changes: 4 additions & 0 deletions apps/docs/pages/plugins/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,9 @@
"react-query": {
"title": "@tanstack/react-query",
"route": "/plugins/react-query"
},
"mdx-docs-nextra": {
"title": "MDX Docs (Nextra)",
"route": "/plugins/mdx-docs-nextra"
}
}
5 changes: 5 additions & 0 deletions apps/docs/remote/pluginsConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module.exports = {
'mdx',
'graphql-server-apollo',
'react-query',
'mdx-docs-nextra'
],
nestedMetaData: {
"nativewind": {
Expand All @@ -27,6 +28,10 @@ module.exports = {
"react-query": {
"title": "@tanstack/react-query",
"route": "/plugins/react-query"
},
"mdx-docs-nextra": {
"title": "MDX Docs (Nextra)",
"route": "/plugins/mdx-docs-nextra"
}
}
}
Expand Down

0 comments on commit da1ab2c

Please sign in to comment.