Skip to content

Commit a36758e

Browse files
committed
fix editPage
1 parent 7d45f03 commit a36758e

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

docusaurus.config.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,7 @@ const config: Config = applyTransformers({
203203
sidebarPath: './sidebars.ts',
204204
// Remove this to remove the "edit this page" links.
205205
path: DOCS_PATH,
206-
editUrl:
207-
`/cms/${ORGANIZATION_NAME}/${PROJECT_NAME}/`,
206+
editUrl: '/',
208207
remarkPlugins: REMARK_PLUGINS,
209208
rehypePlugins: REHYPE_PLUGINS,
210209
beforeDefaultRemarkPlugins: BEFORE_DEFAULT_REMARK_PLUGINS,
@@ -214,8 +213,7 @@ const config: Config = applyTransformers({
214213
path: BLOG_PATH,
215214
showReadingTime: true,
216215
// Remove this to remove the "edit this page" links.
217-
editUrl:
218-
`/cms/${ORGANIZATION_NAME}/${PROJECT_NAME}/`,
216+
editUrl: '/',
219217
remarkPlugins: REMARK_PLUGINS,
220218
rehypePlugins: REHYPE_PLUGINS,
221219
beforeDefaultRemarkPlugins: BEFORE_DEFAULT_REMARK_PLUGINS,
@@ -227,7 +225,7 @@ const config: Config = applyTransformers({
227225
remarkPlugins: REMARK_PLUGINS,
228226
rehypePlugins: REHYPE_PLUGINS,
229227
beforeDefaultRemarkPlugins: BEFORE_DEFAULT_REMARK_PLUGINS,
230-
editUrl: `/cms/${ORGANIZATION_NAME}/${PROJECT_NAME}/`,
228+
editUrl: '/',
231229
...(siteConfig.pages || {})
232230
},
233231
theme: {

src/theme/EditThisPage/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ const { showEditThisPage, showEditThisPageOptions, editThisPageCmsUrl } = custom
2020
const DisplayBadgeFor = new Set<EditThisPageOption>(
2121
showEditThisPageOptions.length === 0 ? ['github', 'github-dev', 'cms'] : showEditThisPageOptions
2222
);
23-
const GH_EDIT_URL = `https://github.com/${organizationName}/${projectName}/edit/main/`;
24-
const GH_DEV_EDIT_URL = `https://github.dev/${organizationName}/${projectName}/blob/main/`;
25-
const CMS_EDIT_URL = `${editThisPageCmsUrl}${organizationName}/${projectName}/`;
23+
const GH_EDIT_URL = `https://github.com/${organizationName}/${projectName}/edit/main`;
24+
const GH_DEV_EDIT_URL = `https://github.dev/${organizationName}/${projectName}/blob/main`;
25+
const CMS_EDIT_URL = `${editThisPageCmsUrl}${organizationName}/${projectName}`;
2626

2727
const EditThisPage = observer(({ editUrl }: Props): ReactNode => {
2828
const userStore = useStore('userStore');

0 commit comments

Comments
 (0)