feat: add twoslash js/ts highlight

This commit is contained in:
camera-2018
2024-06-03 22:14:51 +08:00
parent 6b9e972463
commit b5b72ee931
5 changed files with 4011 additions and 2 deletions

View File

@@ -9,6 +9,8 @@ import Bilibili from '../../components/Bilibili.vue'
import Parallax from '../../components/Parallax.vue'
import './style.css'
import './rainbow.css'
import TwoslashFloatingVue from '@shikijs/vitepress-twoslash/client'
import '@shikijs/vitepress-twoslash/style.css'
let homePageStyle = undefined
@@ -21,6 +23,7 @@ export default {
ctx.app.component('Download', Download)
ctx.app.component('Bilibili', Bilibili)
ctx.app.component('Parallax', Parallax)
ctx.app.use(TwoslashFloatingVue)
if (typeof window === 'undefined')
return
watch(