-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathconfig.js
119 lines (98 loc) · 3.44 KB
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
import fs from 'fs'
import path from 'path'
import dotenv from 'dotenv'
import {viteBundler} from '@vuepress/bundler-vite'
import {defaultTheme} from '@vuepress/theme-default'
import {defineUserConfig} from 'vuepress'
dotenv.config()
function getChildren(folder, sort = 'asc') {
const extension = ['.md']
const names = ['index.md', 'readme.md']
const dir = `${__dirname}/../${folder}`
return fs
.readdirSync(path.join(dir))
.filter(item => fs.statSync(path.join(dir, item)).isFile() && !names.includes(item.toLowerCase()) && extension.includes(path.extname(item)))
.sort((a, b) => {
a = resolveNumeric(a)
b = resolveNumeric(b)
if (a < b) return sort === 'asc' ? -1 : 1
if (a > b) return sort === 'asc' ? 1 : -1
return 0
}).map(item => `/${folder}/${item}`)
}
function resolveNumeric(value) {
const sub = value.substring(0, value.indexOf('.'))
const num = Number(sub)
return isNaN(num) ? value : num
}
const hostname = 'deploy-operations.dragon-code.pro'
export default defineUserConfig({
bundler: viteBundler(),
lang: 'en-US',
title: 'Laravel Deploy Operations',
description: 'Performing any actions during the deployment process',
head: [['link', {rel: 'icon', href: `https://${hostname}/images/logo.svg`}]],
theme: defaultTheme({
hostname,
base: '/',
logo: `https://${hostname}/images/logo.svg`,
repo: 'https://github.com/TheDragonCode/laravel-deploy-operations',
repoLabel: 'GitHub',
docsRepo: 'https://github.com/TheDragonCode/laravel-deploy-operations',
docsBranch: 'main',
docsDir: 'docs',
contributors: false,
editLink: true,
navbar: [
{
text: '6.x',
children: [
{
text: '6.x',
link: '/getting-started/installation.md'
},
{
text: '5.x',
link: 'https://github.com/TheDragonCode/laravel-deploy-operations/blob/5.x/docs/index.md'
}, {
text: '4.x',
link: 'https://github.com/TheDragonCode/laravel-deploy-operations/blob/4.x/docs/index.md'
}, {
text: '3.x',
link: 'https://github.com/TheDragonCode/laravel-deploy-operations/blob/3.x/docs/index.md'
},
]
}],
sidebarDepth: 1,
sidebar: [
{
text: 'Getting Started', children: [
'/index.md',
'/getting-started/installation.md',
'/guide/basic.md',
'/upgrade-guide/index.md'
]
},
{
text: 'Guide',
children: [
'/guide/running.md',
'/guide/creating.md',
'/guide/status.md',
'/guide/rollback.md',
'/guide/customize-stub.md',
]
},
{
text: 'Helpers',
children: getChildren('helpers')
},
{
text: 'Extras',
children: [
'/extras/database-data-dumper.md'
]
}
]
})
})