mirror of
https://gitea.com/gitea/docs.git
synced 2026-07-22 02:37:42 +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*
|
yarn-error.log*
|
||||||
|
|
||||||
.tmp/
|
.tmp/
|
||||||
docs/
|
|
||||||
versioned_docs/
|
|
||||||
# Static files other than those explicitly tracked
|
# Static files other than those explicitly tracked
|
||||||
/static
|
/static
|
||||||
i18n/zh-cn/docusaurus-plugin-content-docs/current
|
i18n/zh-cn/docusaurus-plugin-content-docs/current
|
||||||
|
|||||||
4
Makefile
4
Makefile
@@ -44,7 +44,6 @@ clone_main: clone
|
|||||||
prepare-latest: clone_main
|
prepare-latest: clone_main
|
||||||
cp -r .tmp/upstream-docs/docs/static/* static/
|
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/
|
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
|
cp .tmp/upstream-docs/templates/swagger/v1_json.tmpl static/swagger-latest.json
|
||||||
bash loop_docs.sh latest en-us
|
bash loop_docs.sh latest en-us
|
||||||
|
|
||||||
@@ -52,7 +51,6 @@ prepare-latest: clone_main
|
|||||||
prepare-latest-zh-cn:
|
prepare-latest-zh-cn:
|
||||||
mkdir -p i18n/zh-cn/docusaurus-plugin-content-docs/current
|
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/
|
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
|
bash loop_docs.sh latest zh-cn
|
||||||
|
|
||||||
.PHONY: clone_\#%
|
.PHONY: clone_\#%
|
||||||
@@ -69,7 +67,6 @@ clone_\#%: clone
|
|||||||
prepare\#%: clone_\#%
|
prepare\#%: clone_\#%
|
||||||
cp -r .tmp/upstream-docs/docs/static/* static/
|
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.$*/
|
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
|
cp .tmp/upstream-docs/templates/swagger/v1_json.tmpl static/swagger-$*.json
|
||||||
bash loop_docs.sh $* en-us
|
bash loop_docs.sh $* en-us
|
||||||
|
|
||||||
@@ -77,7 +74,6 @@ prepare\#%: clone_\#%
|
|||||||
prepare-zh-cn\#%:
|
prepare-zh-cn\#%:
|
||||||
mkdir -p i18n/zh-cn/docusaurus-plugin-content-docs/version-1.$*
|
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.$*/
|
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
|
bash loop_docs.sh $* zh-cn
|
||||||
|
|
||||||
.PHONY: install
|
.PHONY: install
|
||||||
|
|||||||
@@ -108,10 +108,6 @@ const config = {
|
|||||||
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`;
|
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}`;
|
return `https://github.com/go-gitea/gitea/tree/${version === 'current' ? 'main': `release/v${version}`}/docs/content/${fileName}`;
|
||||||
},
|
},
|
||||||
versions: {
|
versions: {
|
||||||
@@ -193,7 +189,7 @@ const config = {
|
|||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
type: 'doc',
|
type: 'doc',
|
||||||
docId: 'intro',
|
docId: 'index.en-us',
|
||||||
position: 'left',
|
position: 'left',
|
||||||
label: 'Docs',
|
label: 'Docs',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ module.exports = {
|
|||||||
docs: [
|
docs: [
|
||||||
{
|
{
|
||||||
type: 'doc',
|
type: 'doc',
|
||||||
id: 'intro',
|
id: 'index.en-us',
|
||||||
label: 'What is Gitea?',
|
label: 'What is Gitea?',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"docs": [
|
"docs": [
|
||||||
{
|
{
|
||||||
"type": "doc",
|
"type": "doc",
|
||||||
"id": "intro",
|
"id": "index.en-us",
|
||||||
"label": "What is Gitea?"
|
"label": "What is Gitea?"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"docs": [
|
"docs": [
|
||||||
{
|
{
|
||||||
"type": "doc",
|
"type": "doc",
|
||||||
"id": "intro",
|
"id": "index.en-us",
|
||||||
"label": "What is Gitea?"
|
"label": "What is Gitea?"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"docs": [
|
"docs": [
|
||||||
{
|
{
|
||||||
"type": "doc",
|
"type": "doc",
|
||||||
"id": "intro",
|
"id": "index.en-us",
|
||||||
"label": "What is Gitea?"
|
"label": "What is Gitea?"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"docs": [
|
"docs": [
|
||||||
{
|
{
|
||||||
"type": "doc",
|
"type": "doc",
|
||||||
"id": "intro",
|
"id": "index.en-us",
|
||||||
"label": "What is Gitea?"
|
"label": "What is Gitea?"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user