-
Notifications
You must be signed in to change notification settings - Fork 64
/
index.js
47 lines (41 loc) · 927 Bytes
/
index.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
const { defaultLocales, getDefaultLocales } = require('./helpers/locales')
const locales = Object.keys(defaultLocales)
const containerConfig = Object.keys(defaultLocales['/'].container).map(
(item) => {
const defaultTitle = {}
locales.forEach((locale) => {
defaultTitle[locale] = getDefaultLocales(locale, `container.${item}`)
})
return [
'container',
{
type: item,
defaultTitle,
},
]
}
)
containerConfig.push([
'container',
{
type: 'details',
before: (info) =>
`<details class="custom-block details">${
info ? `<summary>${info}</summary>` : ''
}\n`,
after: () => '</details>\n',
},
])
module.exports = {
plugins: [
'@vuepress/active-header-links',
'@vuepress/last-updated',
[
'define',
{
forceConvert: true,
},
],
['smooth-scroll', true],
].concat(containerConfig),
}