1
1
import { defineUserConfig } from 'vuepress'
2
2
import type { DefaultThemeOptions } from 'vuepress'
3
+ import { permalink } from 'markdown-it-anchor'
3
4
import pkg from '../../package.json'
4
5
5
6
// const md = require('markdown-it')()
@@ -19,36 +20,50 @@ export default defineUserConfig<DefaultThemeOptions>({
19
20
// ['link', { rel: 'mask-icon', href: '/icons/safari-pinned-tab.svg', color: '#3eaf7c' }],
20
21
// ['meta', { name: 'msapplication-TileImage', content: '/icons/msapplication-icon-144x144.png' }],
21
22
// ['meta', { name: 'msapplication-TileColor', content: '#000000' }],
22
- [ 'script' , { src : 'https://media.ethicalads.io/media/client/ethicalads.min.js' } ]
23
+ [ 'script' , { src : 'https://media.ethicalads.io/media/client/ethicalads.min.js' } ] ,
23
24
] ,
24
25
extendsMarkdown : ( md ) => {
25
26
md . use ( require ( 'markdown-it-include' ) ) ,
26
- md . renderer . rules . table_open = function ( tokens , idx ) {
27
- return '<table class="table table-striped">'
28
- }
27
+ ( md . renderer . rules . table_open = function ( tokens , idx ) {
28
+ return '<table class="table table-striped">'
29
+ } )
30
+ } ,
31
+ markdown : {
32
+ anchor : {
33
+ permalink : permalink . ariaHidden ( {
34
+ class : 'anchor-link' ,
35
+ placement : 'after'
36
+ } )
37
+ } ,
29
38
} ,
30
39
plugins : [
31
40
'@vuepress/plugin-toc' ,
32
- [ '@vuepress/container' , {
33
- type : 'demo' ,
34
- render : function ( tokens , idx ) {
35
- if ( tokens [ idx ] . nesting === 1 ) {
36
- return '<div class="docs-example border rounded-top p-4">\n' ;
37
- } else {
38
- return '</div>\n' ;
39
- }
41
+ [
42
+ '@vuepress/container' ,
43
+ {
44
+ type : 'demo' ,
45
+ render : function ( tokens , idx ) {
46
+ if ( tokens [ idx ] . nesting === 1 ) {
47
+ return '<div class="docs-example border rounded-top p-4">\n'
48
+ } else {
49
+ return '</div>\n'
50
+ }
51
+ } ,
40
52
} ,
41
- } ] ,
42
- [ '@vuepress/container' , {
43
- type : 'demo-dark' ,
44
- render : function ( tokens , idx ) {
45
- if ( tokens [ idx ] . nesting === 1 ) {
46
- return '<div class="docs-example rounded-top p-4 bg-dark">\n' ;
47
- } else {
48
- return '</div>\n' ;
49
- }
53
+ ] ,
54
+ [
55
+ '@vuepress/container' ,
56
+ {
57
+ type : 'demo-dark' ,
58
+ render : function ( tokens , idx ) {
59
+ if ( tokens [ idx ] . nesting === 1 ) {
60
+ return '<div class="docs-example rounded-top p-4 bg-dark">\n'
61
+ } else {
62
+ return '</div>\n'
63
+ }
64
+ } ,
50
65
} ,
51
- } ]
66
+ ] ,
52
67
] ,
53
68
theme : path . resolve ( __dirname , './theme-coreui' ) ,
54
69
themeConfig : {
@@ -61,8 +76,8 @@ export default defineUserConfig<DefaultThemeOptions>({
61
76
{
62
77
text : 'Introduction' ,
63
78
link : `/${ pkg . config . version_short } /getting-started/introduction.html` ,
64
- }
65
- ]
79
+ } ,
80
+ ] ,
66
81
} ,
67
82
{
68
83
text : 'Layout' ,
@@ -227,6 +242,10 @@ export default defineUserConfig<DefaultThemeOptions>({
227
242
text : 'Pagination' ,
228
243
link : `/${ pkg . config . version_short } /components/pagination.html` ,
229
244
} ,
245
+ {
246
+ text : 'Popover' ,
247
+ link : `/${ pkg . config . version_short } /components/popover.html` ,
248
+ } ,
230
249
{
231
250
text : 'Progress' ,
232
251
link : `/${ pkg . config . version_short } /components/progress.html` ,
@@ -247,27 +266,16 @@ export default defineUserConfig<DefaultThemeOptions>({
247
266
text : 'Toast' ,
248
267
link : `/${ pkg . config . version_short } /components/toast.html` ,
249
268
} ,
269
+ {
270
+ text : 'Tooltip' ,
271
+ link : `/${ pkg . config . version_short } /components/tooltip.html` ,
272
+ } ,
250
273
{
251
274
text : 'Widgets' ,
252
275
link : `/${ pkg . config . version_short } /components/widgets.html` ,
253
276
} ,
254
277
] ,
255
278
} ,
256
- {
257
- text : 'Directives' ,
258
- icon : '<path fill="var(--ci-primary-color, currentColor)" d="M410.989,16H101.011L16,237.029V496H496V237.029Zm-288,32H240V240H49.143ZM184,272H328v40H184ZM464,464H48V272H152v72H360V272H464ZM272,240V48H389.012l73.845,192Z" class="ci-primary"></path>' ,
259
- link : `/${ pkg . config . version_short } /directives/` ,
260
- children : [
261
- {
262
- text : 'Popover' ,
263
- link : `/${ pkg . config . version_short } /directives/popover.html` ,
264
- } ,
265
- {
266
- text : 'Tooltip' ,
267
- link : `/${ pkg . config . version_short } /directives/tooltip.html` ,
268
- } ,
269
- ]
270
- }
271
279
] ,
272
280
} ,
273
281
} )
0 commit comments