mirror of
https://gitea.com/gitea/docs.git
synced 2026-07-22 02:37:42 +00:00
@@ -13,7 +13,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: https://github.com/actions/setup-node@v3
|
- uses: https://github.com/actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 16
|
||||||
- name: install necessary tools
|
- name: install necessary tools
|
||||||
run: |
|
run: |
|
||||||
apt update -y && apt install -y rsync python python3-pip
|
apt update -y && apt install -y rsync python python3-pip
|
||||||
@@ -26,9 +26,13 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
make prepare\#20
|
make prepare\#20
|
||||||
make prepare-zh-cn\#20
|
make prepare-zh-cn\#20
|
||||||
|
- name: prepare 1.19 docs
|
||||||
|
run: |
|
||||||
|
make prepare\#19
|
||||||
|
make prepare-zh-cn\#19
|
||||||
- name: prepare awesome list
|
- name: prepare awesome list
|
||||||
run: |
|
run: |
|
||||||
make prepare-awesome-latest prepare-awesome\#20
|
make prepare-awesome-latest prepare-awesome\#20 prepare-awesome\#19
|
||||||
- name: cleanup before build
|
- name: cleanup before build
|
||||||
run: |
|
run: |
|
||||||
rm static/_*
|
rm static/_*
|
||||||
|
|||||||
@@ -27,7 +27,11 @@ const apiConfig = [
|
|||||||
{
|
{
|
||||||
route: '/api/1.20/',
|
route: '/api/1.20/',
|
||||||
spec: 'static/swagger-20.json',
|
spec: 'static/swagger-20.json',
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
route: '/api/1.19/',
|
||||||
|
spec: 'static/swagger-19.json',
|
||||||
|
},
|
||||||
]: [],
|
]: [],
|
||||||
// Theme Options for modifying how redoc renders them
|
// Theme Options for modifying how redoc renders them
|
||||||
theme: {
|
theme: {
|
||||||
@@ -89,10 +93,14 @@ const config = {
|
|||||||
banner: 'unreleased',
|
banner: 'unreleased',
|
||||||
},
|
},
|
||||||
'1.20': {
|
'1.20': {
|
||||||
label: '1.20.0',
|
label: '1.20.0-rc2',
|
||||||
|
banner: 'none',
|
||||||
|
},
|
||||||
|
'1.19': {
|
||||||
|
label: '1.19.4',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
lastVersion: '1.20',
|
lastVersion: '1.19',
|
||||||
async sidebarItemsGenerator({defaultSidebarItemsGenerator, ...args}) {
|
async sidebarItemsGenerator({defaultSidebarItemsGenerator, ...args}) {
|
||||||
const {item} = args;
|
const {item} = args;
|
||||||
// Use the provided data to generate a custom sidebar slice
|
// Use the provided data to generate a custom sidebar slice
|
||||||
@@ -155,10 +163,10 @@ const config = {
|
|||||||
label: 'Docs',
|
label: 'Docs',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
to: '/api/1.20/',
|
to: '/api/1.19/',
|
||||||
label: 'API',
|
label: 'API',
|
||||||
position: 'left',
|
position: 'left',
|
||||||
activeBaseRegex: 'api/(1.20|next)/',
|
activeBaseRegex: 'api/(1.19|1.20|next)/',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
position: 'left',
|
position: 'left',
|
||||||
@@ -173,7 +181,8 @@ const config = {
|
|||||||
position: 'right',
|
position: 'right',
|
||||||
items: [
|
items: [
|
||||||
{to: '/api/next/', label: '1.21-dev' },
|
{to: '/api/next/', label: '1.21-dev' },
|
||||||
{to: '/api/1.20/', label: '1.20.0' }
|
{to: '/api/1.20/', label: '1.20.0-rc2' },
|
||||||
|
{to: '/api/1.19/', label: '1.19.4' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -23,8 +23,11 @@ minNodeVer="16"
|
|||||||
minGoVer="1.20"
|
minGoVer="1.20"
|
||||||
goVer="1.20"
|
goVer="1.20"
|
||||||
minorVer="main-nightly"
|
minorVer="main-nightly"
|
||||||
if [ "$version" == "1.20" ]; then
|
if [ "$version" == "1.19" ]; then
|
||||||
minorVer="1.20.0"
|
minorVer="1.19.4"
|
||||||
|
minGoVer="1.19"
|
||||||
|
elif [ "$version" == "1.20" ]; then
|
||||||
|
minorVer="1.20.0-rc2"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
docs_dir="versioned_docs/version-$version"
|
docs_dir="versioned_docs/version-$version"
|
||||||
@@ -59,6 +62,8 @@ if [ "$version" == "latest" ]; then
|
|||||||
SED_INPLACE 's/"version": "{{AppVer | JSEscape | Safe}}"/"version": "1.21-dev"/' static/swagger-latest.json
|
SED_INPLACE 's/"version": "{{AppVer | JSEscape | Safe}}"/"version": "1.21-dev"/' static/swagger-latest.json
|
||||||
elif [ "$version" == "1.20" ]; then
|
elif [ "$version" == "1.20" ]; then
|
||||||
SED_INPLACE 's/"version": "{{AppVer | JSEscape | Safe}}"/"version": "1.20.0-rc2"/' static/swagger-20.json
|
SED_INPLACE 's/"version": "{{AppVer | JSEscape | Safe}}"/"version": "1.20.0-rc2"/' static/swagger-20.json
|
||||||
|
elif [ "$version" == "1.19" ]; then
|
||||||
|
SED_INPLACE 's/"version": "{{AppVer | JSEscape | Safe}}"/"version": "1.19.4"/' static/swagger-19.json
|
||||||
fi
|
fi
|
||||||
SED_INPLACE 's/"basePath": "{{AppSubUrl | JSEscape | Safe}}/"basePath": "https:\/\/gitea.com/' static/swagger-"$1".json
|
SED_INPLACE 's/"basePath": "{{AppSubUrl | JSEscape | Safe}}/"basePath": "https:\/\/gitea.com/' static/swagger-"$1".json
|
||||||
|
|
||||||
|
|||||||
97
versioned_sidebars/version-1.19-sidebars.json
Normal file
97
versioned_sidebars/version-1.19-sidebars.json
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
{
|
||||||
|
"docs": [
|
||||||
|
{
|
||||||
|
"type": "doc",
|
||||||
|
"id": "intro",
|
||||||
|
"label": "What is Gitea?"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "category",
|
||||||
|
"label": "Installation",
|
||||||
|
"link": {
|
||||||
|
"type": "generated-index"
|
||||||
|
},
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"type": "autogenerated",
|
||||||
|
"dirName": "installation"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "category",
|
||||||
|
"label": "Administration",
|
||||||
|
"link": {
|
||||||
|
"type": "generated-index"
|
||||||
|
},
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"type": "autogenerated",
|
||||||
|
"dirName": "administration"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "category",
|
||||||
|
"label": "Usage",
|
||||||
|
"link": {
|
||||||
|
"type": "generated-index"
|
||||||
|
},
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"type": "category",
|
||||||
|
"label": "Packages",
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"type": "autogenerated",
|
||||||
|
"dirName": "packages"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "autogenerated",
|
||||||
|
"dirName": "usage"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "category",
|
||||||
|
"label": "Development",
|
||||||
|
"link": {
|
||||||
|
"type": "generated-index"
|
||||||
|
},
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"type": "autogenerated",
|
||||||
|
"dirName": "development"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "category",
|
||||||
|
"label": "Contributing",
|
||||||
|
"link": {
|
||||||
|
"type": "generated-index"
|
||||||
|
},
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"type": "autogenerated",
|
||||||
|
"dirName": "contributing"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "category",
|
||||||
|
"label": "Help",
|
||||||
|
"link": {
|
||||||
|
"type": "generated-index"
|
||||||
|
},
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"type": "autogenerated",
|
||||||
|
"dirName": "help"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
[
|
[
|
||||||
"1.20"
|
"1.20",
|
||||||
|
"1.19"
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user