File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,6 +35,11 @@ function generateTitle(filename) {
3535 . replace ( / \b \w / g, ( c ) => c . toUpperCase ( ) ) ;
3636}
3737
38+ // Fix internal markdown links (.md → /) for static site compatibility
39+ function fixMarkdownLinks ( content ) {
40+ return content . replace ( / ( \] \( [ A - Z 0 - 9 _ - ] + ) \. m d ( \) ) / gi, '$1/$2' ) ;
41+ }
42+
3843// Helper to get slug from filename
3944function destSlugFromFilename ( destFile ) {
4045 const name = path . basename ( destFile , path . extname ( destFile ) ) ;
@@ -71,7 +76,8 @@ async function fetchGovernanceDocs() {
7176 if ( ! destFile ) continue ;
7277
7378 const response = await fetch ( file . download_url ) ;
74- const content = await response . text ( ) ;
79+ let content = await response . text ( ) ;
80+ content = fixMarkdownLinks ( content ) ;
7581 const title = generateTitle ( filename ) ;
7682
7783 const sortOrder =
You can’t perform that action at this time.
0 commit comments