From a6008e65afd10656a93d787ce68d52ef813658d6 Mon Sep 17 00:00:00 2001 From: jolheiser Date: Mon, 19 Feb 2024 16:13:00 +0000 Subject: [PATCH] fix: correct url for awesome-gitea "edit this page" (#109) Signed-off-by: jolheiser Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/109 Reviewed-by: Lunny Xiao Co-authored-by: jolheiser Co-committed-by: jolheiser --- docusaurus.config.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docusaurus.config.js b/docusaurus.config.js index 7a1293d9..25f1b875 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -95,6 +95,10 @@ const config = { sidebarPath: require.resolve('./sidebars.js'), routeBasePath: '/', // Serve the docs at the site's root editUrl: ({versionDocsDirPath, docPath, locale, version, permalink}) => { + // Special case for awesome page + if (docPath.includes('awesome.md')) { + return `https://gitea.com/gitea/awesome-gitea/src/branch/main/README.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')) {