Use a formal docusaurus i18n structure

This commit is contained in:
Lunny Xiao
2024-06-06 20:44:06 +08:00
parent 089f2a0b46
commit b9e0a85c9b
1126 changed files with 72 additions and 5510 deletions
+5 -5
View File
@@ -82,7 +82,7 @@ const config = {
i18n: {
defaultLocale: 'en-us',
locales: ['en-us', 'zh-cn'/*, 'fr-fr', 'zh-tw'*/], // temporarily disable other locales
locales: ['en-us', 'zh-cn'/*,'fr-fr', 'zh-tw'*/], // temporarily disable other locales
localeConfigs: {
'en-us': {
label: 'English',
@@ -108,7 +108,7 @@ const config = {
return `https://gitea.com/gitea/awesome-gitea/src/branch/main/README.md`
}
let fileName = `${docPath.replace('.md', '')}.${locale}.md`;
return `https://github.com/go-gitea/gitea/tree/${version === 'current' ? 'main': `release/v${version}`}/docs/content/${fileName}`;
return `https://gitea.com/gitea/docs/tree/${version === 'current' ? 'docs': `versioned_docs/version-${version}`}/${fileName}`;
},
versions: {
current: {
@@ -189,7 +189,7 @@ const config = {
items: [
{
type: 'doc',
docId: 'index.en-us',
docId: 'index',
position: 'left',
label: 'Docs',
},
@@ -234,10 +234,10 @@ const config = {
type: 'search',
position: 'right',
},
{
/*{
type: 'localeDropdown',
position: 'right',
},
},*/
{
type: 'docsVersionDropdown',
position: 'right',