Fix editUrl (#31)

Fix #9

Reviewed-on: https://gitea.com/gitea/docs/pulls/31
This commit is contained in:
Lunny Xiao
2024-07-17 04:22:05 +00:00
parent 5df20429a2
commit a49bcbf20d
2 changed files with 5 additions and 3 deletions

View File

@@ -364,7 +364,7 @@ provided key. You should also set the value
`SSH_CREATE_AUTHORIZED_KEYS_FILE=false` in the `[server]` section of `SSH_CREATE_AUTHORIZED_KEYS_FILE=false` in the `[server]` section of
`app.ini`. `app.ini`.
:::notice :::note
opensshd requires the Gitea program to be owned by root and not 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 writable by group or others. The program must be specified by an absolute
path. path.

View File

@@ -107,8 +107,10 @@ const config = {
if (docPath.includes('awesome.md')) { if (docPath.includes('awesome.md')) {
return `https://gitea.com/gitea/awesome-gitea/src/branch/main/README.md` return `https://gitea.com/gitea/awesome-gitea/src/branch/main/README.md`
} }
let fileName = `${docPath.replace('.md', '')}.${locale}.md`; if (locale === 'en-us') {
return `https://gitea.com/gitea/docs/tree/${version === 'current' ? 'docs': `versioned_docs/version-${version}`}/${fileName}`; 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: { versions: {
current: { current: {