@@ -9,19 +9,19 @@ export async function getStaticProps({ params }) {
99 const branchName = branchNamePath ?.replace (/ \. mdx? / , ' ' )?.replace ?.(' plugins/' , ' ' )
1010 let pageMarkdown = ' # 404 | Plugin Not Found\n\n The page may not exist, or a remote MDX rate limit may have triggered'
1111 try {
12- if (branchName ) {
13- const githubApiBranchPRsUrl = ` https://api.github.com/repos/Aetherspace/universal-app-router/pulls?head=Aetherspace:with/${branchName } `
14- const response = await fetch (githubApiBranchPRsUrl )
15- const branchPRs = await response .json ()
16- const branchPR = branchPRs [0 ]
17- const branchPRMarkdown = branchPR .body
18- const branchPRTitle = branchPR .title
19- pageMarkdown = branchPRMarkdown .split (' \n ' ).reduce ((acc , line ) => {
20- let newLine = line
21- if (line .includes (' <img ' ) && line .includes (' ">' )) newLine = newLine .replace (' ">' , ' " />' )
22- return acc + newLine + ' \n '
23- }, ` # \` ${ branchPRTitle } \`\n\n ` )
24- }
12+ if (branchName ) {
13+ const githubApiBranchPRsUrl = ` https://api.github.com/repos/Aetherspace/universal-app-router/pulls?head=Aetherspace:with/${branchName } `
14+ const response = await fetch (githubApiBranchPRsUrl )
15+ const branchPRs = await response .json ()
16+ const branchPR = branchPRs [0 ]
17+ const branchPRMarkdown = branchPR .body
18+ const branchPRTitle = branchPR .title ?. replace ?.( ' plugin: ' , ' ' )
19+ pageMarkdown = branchPRMarkdown .split (' \n ' ).reduce ((acc , line ) => {
20+ let newLine = line
21+ if (line .includes (' <img ' ) && line .includes (' ">' )) newLine = newLine .replace (' ">' , ' " />' )
22+ return acc + newLine + ' \n '
23+ }, ` # ${ branchPRTitle } \n\n \`\`\` zsch \n git merge with/${ branchName } \n\`\` \`\n\n ` )
24+ }
2525 } catch (error ) {
2626 if (! error ) console .error (error )
2727 }
@@ -31,8 +31,7 @@ export async function getStaticProps({ params }) {
3131 props: {
3232 ... dynamicMeta ,
3333 ... dynamicMDX ,
34- },
35- revalidate: false ,
34+ }
3635 }
3736}
3837
0 commit comments