diff --git a/docusaurus.config.js b/docusaurus.config.js index 095b1570..2dddd313 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -46,8 +46,16 @@ const config = { docs: { sidebarPath: require.resolve('./sidebars.js'), routeBasePath: '/', // Serve the docs at the site's root - editUrl: ({locale, versionDocsDirPath, docPath}) => { - return `https://github.com/go-gitea/gitea/tree/main/docs/content/doc/${docPath}` + editUrl: ({versionDocsDirPath, docPath, locale, version, permalink}) => { + let fileName = `doc/${docPath.replace('.md', '')}.en-us.md`; + if (locale === 'zh-cn') { + fileName = `doc/${docPath.replace('.md', '')}.zh-cn.md`; + } + // intro.md has different name from upstream, need to handle this here + if (docPath.includes('intro.md')) { + fileName = locale === 'zh-cn' ? 'page/index.zh-cn.md': 'page/index.en-us.md'; + } + return `https://github.com/go-gitea/gitea/tree/main/docs/content/${fileName}`; }, versions: { current: { diff --git a/src/css/custom.css b/src/css/custom.css index 32b75422..e8a72d7e 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -29,7 +29,7 @@ --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3); } -[data-theme='dark'] .announcementBar_node_modules-\@docusaurus-theme-classic-lib-theme-AnnouncementBar-styles-module { +[data-theme='dark'] [class*='announcementBar'] { color: var(--ifm-font-color-base); background-color: var(--ifm-background-color); }