mirror of
https://github.com/andatoshiki/toshiki-notebook.git
synced 2026-06-06 09:16:45 +00:00
fix(config): removed currenly wip doc utilities in developmental phase for avoiding crashes on build due to undiscoverable packages when pre-installation
This commit is contained in:
parent
77edcbc4b3
commit
496bcaaaf5
@ -1,6 +1,6 @@
|
|||||||
import process from 'node:process'
|
import process from 'node:process'
|
||||||
import { BiDirectionalLinks } from '@nolebase/markdown-it-bi-directional-links'
|
// import { BiDirectionalLinks } from '@nolebase/markdown-it-bi-directional-links'
|
||||||
import { ElementTransform } from '@nolebase/markdown-it-element-transform'
|
// import { ElementTransform } from '@nolebase/markdown-it-element-transform'
|
||||||
import type { MarkdownOptions } from 'vitepress'
|
import type { MarkdownOptions } from 'vitepress'
|
||||||
import mdkatex from '@andatoshiki/markdown-it-katex'
|
import mdkatex from '@andatoshiki/markdown-it-katex'
|
||||||
import mdTasklist from 'markdown-it-task-lists'
|
import mdTasklist from 'markdown-it-task-lists'
|
||||||
@ -11,41 +11,46 @@ export const markdown: MarkdownOptions = {
|
|||||||
html: true,
|
html: true,
|
||||||
theme: {
|
theme: {
|
||||||
light: 'github-light',
|
light: 'github-light',
|
||||||
dark: 'github-dark-dimmed'
|
dark: 'github-dark-dimmed',
|
||||||
},
|
},
|
||||||
lineNumbers: true,
|
lineNumbers: true,
|
||||||
config: md => {
|
config: md => {
|
||||||
// use more markdown-it plugins!
|
// use more markdown-it plugins!
|
||||||
md.use(mdkatex),
|
md.use(mdkatex),
|
||||||
md.use(mdTasklist),
|
md.use(mdTasklist),
|
||||||
md.use(mdCaption),
|
md.use(mdCaption),
|
||||||
// md.use(mdLink),
|
// md.use(mdLink),
|
||||||
md.use(BiDirectionalLinks({
|
// md.use(
|
||||||
dir: 'docs/',
|
// BiDirectionalLinks({
|
||||||
})),
|
// dir: 'docs/',
|
||||||
md.use(ElementTransform, (() => {
|
// })
|
||||||
let transformNextLinkCloseToken = false
|
// ),
|
||||||
|
// md.use(
|
||||||
|
// ElementTransform,
|
||||||
|
// (() => {
|
||||||
|
// let transformNextLinkCloseToken = false
|
||||||
|
|
||||||
return {
|
// return {
|
||||||
transform(token) {
|
// transform(token) {
|
||||||
switch (token.type) {
|
// switch (token.type) {
|
||||||
case 'link_open':
|
// case 'link_open':
|
||||||
if (token.attrGet('class') !== 'header-anchor') {
|
// if (token.attrGet('class') !== 'header-anchor') {
|
||||||
token.tag = 'VPNolebaseInlineLinkPreview'
|
// token.tag = 'VPNolebaseInlineLinkPreview'
|
||||||
transformNextLinkCloseToken = true
|
// transformNextLinkCloseToken = true
|
||||||
}
|
// }
|
||||||
break
|
// break
|
||||||
case 'link_close':
|
// case 'link_close':
|
||||||
if (transformNextLinkCloseToken) {
|
// if (transformNextLinkCloseToken) {
|
||||||
token.tag = 'VPNolebaseInlineLinkPreview'
|
// token.tag = 'VPNolebaseInlineLinkPreview'
|
||||||
transformNextLinkCloseToken = false
|
// transformNextLinkCloseToken = false
|
||||||
}
|
// }
|
||||||
|
|
||||||
break
|
// break
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
}
|
// }
|
||||||
})())
|
// })()
|
||||||
|
// )
|
||||||
// insert specific custom vue layout template slots under a markdown tag attributes (currenlty disabled and unncessary because applied via markdowntransform component)
|
// insert specific custom vue layout template slots under a markdown tag attributes (currenlty disabled and unncessary because applied via markdowntransform component)
|
||||||
// md.renderer.rules.heading_close = (tokens, idx, options, env, slf) => {
|
// md.renderer.rules.heading_close = (tokens, idx, options, env, slf) => {
|
||||||
// let htmlResult = slf.renderToken(tokens, idx, options);
|
// let htmlResult = slf.renderToken(tokens, idx, options);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user