mirror of
https://gitea.com/gitea/docs.git
synced 2026-07-07 22:18:51 +00:00
@@ -27,7 +27,11 @@ const apiConfig = [
|
||||
{
|
||||
route: '/api/1.20/',
|
||||
spec: 'static/swagger-20.json',
|
||||
}
|
||||
},
|
||||
{
|
||||
route: '/api/1.19/',
|
||||
spec: 'static/swagger-19.json',
|
||||
},
|
||||
]: [],
|
||||
// Theme Options for modifying how redoc renders them
|
||||
theme: {
|
||||
@@ -89,10 +93,14 @@ const config = {
|
||||
banner: 'unreleased',
|
||||
},
|
||||
'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}) {
|
||||
const {item} = args;
|
||||
// Use the provided data to generate a custom sidebar slice
|
||||
@@ -155,10 +163,10 @@ const config = {
|
||||
label: 'Docs',
|
||||
},
|
||||
{
|
||||
to: '/api/1.20/',
|
||||
to: '/api/1.19/',
|
||||
label: 'API',
|
||||
position: 'left',
|
||||
activeBaseRegex: 'api/(1.20|next)/',
|
||||
activeBaseRegex: 'api/(1.19|1.20|next)/',
|
||||
},
|
||||
{
|
||||
position: 'left',
|
||||
@@ -173,7 +181,8 @@ const config = {
|
||||
position: 'right',
|
||||
items: [
|
||||
{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' },
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user