Skip to content

Commit b49d73b

Browse files
committed
more
1 parent a64549f commit b49d73b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

website/next.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { translate } from '@edgeandnode/gds'
44

55
// Compile `i18n.ts` to `i18n.js` since we can't import `ts` files in `next.config.js`
66
import { translations } from './dist/i18n.js'
7-
import { remarkReplaceGitHubLinks } from './src/remarkReplaceGitHubLinks.js'
7+
import { remarkTransformRemoteGitHub } from './src/remarkTransformRemoteGitHub.js'
88

99
const env = {
1010
ENVIRONMENT: process.env.ENVIRONMENT,
@@ -99,7 +99,7 @@ const withNextra = nextra({
9999
]
100100
},
101101
mdxOptions: {
102-
remarkPlugins: [remarkReplaceGitHubLinks],
102+
remarkPlugins: [remarkTransformRemoteGitHub],
103103
},
104104
})
105105

website/src/remarkReplaceGitHubLinks.js renamed to website/src/remarkTransformRemoteGitHub.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const GO_BACK_REPEATED_REGEX = /(\.\.\/)+/
2323

2424
const EXTERNAL_LINK_REGEX = /^(https?:)?\/\//
2525

26-
export const remarkReplaceGitHubLinks = () => (tree, file) => {
26+
export const remarkTransformRemoteGitHub = () => (tree, file) => {
2727
// Rewrite relative links to ensure they work
2828
const filePath = path.relative(process.cwd(), file.history[0])
2929
const [fileName, directory] = filePath.split('/').reverse()
@@ -62,6 +62,6 @@ remoteFilePath: https://github.com/${user}/${repo}/tree/${branch}/${docsPath}${f
6262
delete node.children
6363
delete node.position
6464

65-
return EXIT // stop traversing in case there is other h1 nodes
65+
return EXIT // stop traversing in case there are other h1 nodes
6666
})
6767
}

0 commit comments

Comments
 (0)