From 39f92613338105dc8015126b6e8ac8fa2946a674 Mon Sep 17 00:00:00 2001 From: Denys Konovalov Date: Mon, 31 Jul 2023 17:32:28 +0000 Subject: [PATCH] Fix edit url (#55) Since the Docusaurus-ify PR series from @jolheiser, the docs pages are no longer inside the doc/ subfolder. Fix the URL for editing a docs page in Docusaurus accordingly. Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/55 Reviewed-by: John Olheiser Co-authored-by: Denys Konovalov Co-committed-by: Denys Konovalov --- docusaurus.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index d00dfb89..ea6f72c7 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -80,7 +80,7 @@ const config = { sidebarPath: require.resolve('./sidebars.js'), routeBasePath: '/', // Serve the docs at the site's root editUrl: ({versionDocsDirPath, docPath, locale, version, permalink}) => { - let fileName = `doc/${docPath.replace('.md', '')}.${locale}.md`; + let fileName = `${docPath.replace('.md', '')}.${locale}.md`; // intro.md has different name from upstream, need to handle this here if (docPath.includes('intro.md')) { fileName = `page/index.${locale}.md`;