11import { defineUserConfig } from 'vuepress'
22import type { DefaultThemeOptions } from 'vuepress'
3+ import { permalink } from 'markdown-it-anchor'
34import pkg from '../../package.json'
45
56// const md = require('markdown-it')()
@@ -19,36 +20,50 @@ export default defineUserConfig<DefaultThemeOptions>({
1920 // ['link', { rel: 'mask-icon', href: '/icons/safari-pinned-tab.svg', color: '#3eaf7c' }],
2021 // ['meta', { name: 'msapplication-TileImage', content: '/icons/msapplication-icon-144x144.png' }],
2122 // ['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' } ] ,
2324 ] ,
2425 extendsMarkdown : ( md ) => {
2526 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+ } ,
2938 } ,
3039 plugins : [
3140 '@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+ } ,
4052 } ,
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+ } ,
5065 } ,
51- } ]
66+ ] ,
5267 ] ,
5368 theme : path . resolve ( __dirname , './theme-coreui' ) ,
5469 themeConfig : {
@@ -61,8 +76,8 @@ export default defineUserConfig<DefaultThemeOptions>({
6176 {
6277 text : 'Introduction' ,
6378 link : `/${ pkg . config . version_short } /getting-started/introduction.html` ,
64- }
65- ]
79+ } ,
80+ ] ,
6681 } ,
6782 {
6883 text : 'Layout' ,
@@ -227,6 +242,10 @@ export default defineUserConfig<DefaultThemeOptions>({
227242 text : 'Pagination' ,
228243 link : `/${ pkg . config . version_short } /components/pagination.html` ,
229244 } ,
245+ {
246+ text : 'Popover' ,
247+ link : `/${ pkg . config . version_short } /components/popover.html` ,
248+ } ,
230249 {
231250 text : 'Progress' ,
232251 link : `/${ pkg . config . version_short } /components/progress.html` ,
@@ -247,27 +266,16 @@ export default defineUserConfig<DefaultThemeOptions>({
247266 text : 'Toast' ,
248267 link : `/${ pkg . config . version_short } /components/toast.html` ,
249268 } ,
269+ {
270+ text : 'Tooltip' ,
271+ link : `/${ pkg . config . version_short } /components/tooltip.html` ,
272+ } ,
250273 {
251274 text : 'Widgets' ,
252275 link : `/${ pkg . config . version_short } /components/widgets.html` ,
253276 } ,
254277 ] ,
255278 } ,
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- }
271279 ] ,
272280 } ,
273281} )
0 commit comments