Skip to content

Commit

Permalink
read enhance
Browse files Browse the repository at this point in the history
  • Loading branch information
Cryolitia committed Dec 12, 2023
1 parent 6e767e8 commit 0df2b15
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 71 deletions.
7 changes: 7 additions & 0 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ import { sidebar } from './sidebar'

// https://vitepress.dev/reference/site-config
export default defineConfig({
vite: {
ssr: {
noExternal: [
'@nolebase/vitepress-plugin-enhanced-readabilities',
],
},
},
title: "SOC-8",
description: "跨性别和多元性别人群健康照护指南第八版(SOC-8)",
base: '/SOC-8/',
Expand Down
20 changes: 20 additions & 0 deletions docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,31 @@ import './styles/vitepress-vars.css'
import './styles/styles.css'
import 'uno.css'

import {
NolebaseHighlightTargetedHeading,
} from '@nolebase/vitepress-plugin-highlight-targeted-heading'

import '@nolebase/vitepress-plugin-highlight-targeted-heading/dist/style.css'

import {
NolebaseEnhancedReadabilitiesMenu,
NolebaseEnhancedReadabilitiesScreenMenu,
} from '@nolebase/vitepress-plugin-enhanced-readabilities'

import '@nolebase/vitepress-plugin-enhanced-readabilities/dist/style.css'

export default {
extends: DefaultTheme,
Layout: () => {
return h(DefaultTheme.Layout, null, {
// 为较宽的屏幕的导航栏添加阅读增强菜单
'nav-bar-content-after': () => h(NolebaseEnhancedReadabilitiesMenu),
// 为较窄的屏幕(通常是小于 iPad Mini)添加阅读增强菜单
'nav-screen-content-after': () => h(NolebaseEnhancedReadabilitiesScreenMenu),
// https://vitepress.dev/guide/extending-default-theme#layout-slots
'layout-top': () => [
h(NolebaseHighlightTargetedHeading),
],
})
},
enhanceApp() {
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
"vuepress-theme-hope": "2.0.0-rc.0"
},
"dependencies": {
"@nolebase/vitepress-plugin-enhanced-readabilities": "^1.7.2",
"@nolebase/vitepress-plugin-highlight-targeted-heading": "^1.3.0",
"katex": "^0.16.9",
"vuepress-plugin-md-enhance": "2.0.0-rc.0"
}
Expand Down
Loading

0 comments on commit 0df2b15

Please sign in to comment.