Skip to content

Commit 4f9c2fc

Browse files
nelopuchadesoliviertassinari
authored andcommitted
[docs] Fix "Edit this page" link (#19170)
1 parent e5b2e22 commit 4f9c2fc

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

docs/src/modules/components/useMarkdownDocs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ ${headers.components
143143
key={content}
144144
demo={demos[name]}
145145
demoOptions={demoOptions}
146-
githubLocation={`${SOURCE_CODE_ROOT_URL}/${name}`}
146+
githubLocation={`${SOURCE_CODE_ROOT_URL}/docs/src/${name}`}
147147
/>
148148
);
149149
}

docs/src/modules/constants.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const LANGUAGES_LABEL = [
5252
},
5353
];
5454

55-
const SOURCE_CODE_ROOT_URL = 'https://github.com/mui-org/material-ui/blob/master/docs/src';
55+
const SOURCE_CODE_ROOT_URL = 'https://github.com/mui-org/material-ui/blob/master';
5656

5757
module.exports = {
5858
CODE_VARIANTS,

docs/src/modules/utils/generateMarkdown.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ import * as recast from 'recast';
33
import { parse as docgenParse } from 'react-docgen';
44
import { Router as Router2 } from 'next/router';
55
import { pageToTitle } from './helpers';
6-
import { LANGUAGES_IN_PROGRESS } from 'docs/src/modules/constants';
6+
import { SOURCE_CODE_ROOT_URL, LANGUAGES_IN_PROGRESS } from 'docs/src/modules/constants';
77

8-
const SOURCE_CODE_ROOT_URL = 'https://github.com/mui-org/material-ui/blob/master';
98
const PATH_REPLACE_REGEX = /\\/g;
109
const PATH_SEPARATOR = '/';
1110
const DEMO_IGNORE = LANGUAGES_IN_PROGRESS.map(language => `-${language}.md`);

0 commit comments

Comments
 (0)