mirror of
https://gitea.com/gitea/docs.git
synced 2025-08-15 21:01:51 +00:00
Make the index page default
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@ -20,8 +20,6 @@ yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
.tmp/
|
||||
docs/
|
||||
versioned_docs/
|
||||
# Static files other than those explicitly tracked
|
||||
/static
|
||||
i18n/zh-cn/docusaurus-plugin-content-docs/current
|
||||
|
4
Makefile
4
Makefile
@ -44,7 +44,6 @@ clone_main: clone
|
||||
prepare-latest: clone_main
|
||||
cp -r .tmp/upstream-docs/docs/static/* static/
|
||||
rsync -avz --prune-empty-dirs --include '*/' --include='*.en-us.md' --exclude '*' .tmp/upstream-docs/docs/content/ docs/
|
||||
cp .tmp/upstream-docs/docs/content/index.en-us.md docs/intro.md
|
||||
cp .tmp/upstream-docs/templates/swagger/v1_json.tmpl static/swagger-latest.json
|
||||
bash loop_docs.sh latest en-us
|
||||
|
||||
@ -52,7 +51,6 @@ prepare-latest: clone_main
|
||||
prepare-latest-zh-cn:
|
||||
mkdir -p i18n/zh-cn/docusaurus-plugin-content-docs/current
|
||||
rsync -avz --prune-empty-dirs --include '*/' --include='*.zh-cn.md' --exclude '*' .tmp/upstream-docs/docs/content/ i18n/zh-cn/docusaurus-plugin-content-docs/current/
|
||||
cp .tmp/upstream-docs/docs/content/index.zh-cn.md i18n/zh-cn/docusaurus-plugin-content-docs/current/intro.md
|
||||
bash loop_docs.sh latest zh-cn
|
||||
|
||||
.PHONY: clone_\#%
|
||||
@ -69,7 +67,6 @@ clone_\#%: clone
|
||||
prepare\#%: clone_\#%
|
||||
cp -r .tmp/upstream-docs/docs/static/* static/
|
||||
rsync -a --prune-empty-dirs --include '*/' --include='*.en-us.md' --exclude '*' .tmp/upstream-docs/docs/content/ versioned_docs/version-1.$*/
|
||||
cp .tmp/upstream-docs/docs/content/index.en-us.md versioned_docs/version-1.$*/intro.md
|
||||
cp .tmp/upstream-docs/templates/swagger/v1_json.tmpl static/swagger-$*.json
|
||||
bash loop_docs.sh $* en-us
|
||||
|
||||
@ -77,7 +74,6 @@ prepare\#%: clone_\#%
|
||||
prepare-zh-cn\#%:
|
||||
mkdir -p i18n/zh-cn/docusaurus-plugin-content-docs/version-1.$*
|
||||
rsync -avz --prune-empty-dirs --include '*/' --include='*.zh-cn.md' --exclude '*' .tmp/upstream-docs/docs/content/ i18n/zh-cn/docusaurus-plugin-content-docs/version-1.$*/
|
||||
cp .tmp/upstream-docs/docs/content/index.zh-cn.md i18n/zh-cn/docusaurus-plugin-content-docs/version-1.$*/intro.md
|
||||
bash loop_docs.sh $* zh-cn
|
||||
|
||||
.PHONY: install
|
||||
|
@ -108,10 +108,6 @@ const config = {
|
||||
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')) {
|
||||
fileName = `page/index.${locale}.md`;
|
||||
}
|
||||
return `https://github.com/go-gitea/gitea/tree/${version === 'current' ? 'main': `release/v${version}`}/docs/content/${fileName}`;
|
||||
},
|
||||
versions: {
|
||||
@ -193,7 +189,7 @@ const config = {
|
||||
items: [
|
||||
{
|
||||
type: 'doc',
|
||||
docId: 'intro',
|
||||
docId: 'index.en-us',
|
||||
position: 'left',
|
||||
label: 'Docs',
|
||||
},
|
||||
|
@ -2,7 +2,7 @@ module.exports = {
|
||||
docs: [
|
||||
{
|
||||
type: 'doc',
|
||||
id: 'intro',
|
||||
id: 'index.en-us',
|
||||
label: 'What is Gitea?',
|
||||
},
|
||||
{
|
||||
@ -84,4 +84,4 @@ module.exports = {
|
||||
]
|
||||
},
|
||||
]
|
||||
};
|
||||
};
|
||||
|
@ -2,7 +2,7 @@
|
||||
"docs": [
|
||||
{
|
||||
"type": "doc",
|
||||
"id": "intro",
|
||||
"id": "index.en-us",
|
||||
"label": "What is Gitea?"
|
||||
},
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
"docs": [
|
||||
{
|
||||
"type": "doc",
|
||||
"id": "intro",
|
||||
"id": "index.en-us",
|
||||
"label": "What is Gitea?"
|
||||
},
|
||||
{
|
||||
@ -84,4 +84,4 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
"docs": [
|
||||
{
|
||||
"type": "doc",
|
||||
"id": "intro",
|
||||
"id": "index.en-us",
|
||||
"label": "What is Gitea?"
|
||||
},
|
||||
{
|
||||
@ -84,4 +84,4 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
"docs": [
|
||||
{
|
||||
"type": "doc",
|
||||
"id": "intro",
|
||||
"id": "index.en-us",
|
||||
"label": "What is Gitea?"
|
||||
},
|
||||
{
|
||||
|
Reference in New Issue
Block a user