From a49bcbf20d25f573a359e1fd761fe7b8b63bed64 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Wed, 17 Jul 2024 04:22:05 +0000 Subject: [PATCH] Fix editUrl (#31) Fix #9 Reviewed-on: https://gitea.com/gitea/docs/pulls/31 --- docs/administration/command-line.md | 2 +- docusaurus.config.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/administration/command-line.md b/docs/administration/command-line.md index 87ba4bf8..0ea6a8a7 100644 --- a/docs/administration/command-line.md +++ b/docs/administration/command-line.md @@ -364,7 +364,7 @@ provided key. You should also set the value `SSH_CREATE_AUTHORIZED_KEYS_FILE=false` in the `[server]` section of `app.ini`. -:::notice +:::note opensshd requires the Gitea program to be owned by root and not writable by group or others. The program must be specified by an absolute path. diff --git a/docusaurus.config.js b/docusaurus.config.js index ae9bc70c..68d878fa 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -107,8 +107,10 @@ const config = { if (docPath.includes('awesome.md')) { return `https://gitea.com/gitea/awesome-gitea/src/branch/main/README.md` } - let fileName = `${docPath.replace('.md', '')}.${locale}.md`; - return `https://gitea.com/gitea/docs/tree/${version === 'current' ? 'docs': `versioned_docs/version-${version}`}/${fileName}`; + if (locale === 'en-us') { + return `https://gitea.com/gitea/docs/src/branch/main/${version === 'current' ? 'docs': `versioned_docs/version-${version}`}/${docPath}`; + } + return `https://gitea.com/gitea/docs/src/branch/main/i18n/${locale}/docusaurus-plugin-content-docs/${version === 'current' ? 'current': `version-${version}`}/${docPath}`; }, versions: { current: {