diff --git a/docs/.vitepress/config.mjs b/docs/.vitepress/config.mjs index 50d3564..bc8c444 100644 --- a/docs/.vitepress/config.mjs +++ b/docs/.vitepress/config.mjs @@ -15,9 +15,9 @@ const commonThemeConfig = { search: { provider: 'local' }, - socialLinks: [ - { icon: 'github', link: 'https://github.com/datawhalechina/easy-vibe' } - ], + // socialLinks: [ + // { icon: 'github', link: 'https://github.com/datawhalechina/easy-vibe' } + // ], outline: { level: [1, 6] } diff --git a/docs/.vitepress/theme/Layout.vue b/docs/.vitepress/theme/Layout.vue index 87feedd..d68beb7 100644 --- a/docs/.vitepress/theme/Layout.vue +++ b/docs/.vitepress/theme/Layout.vue @@ -2,6 +2,7 @@ import DefaultTheme from 'vitepress/theme' import { useData } from 'vitepress' import TextType from './components/TextType.vue' +import GitHubStars from './components/GitHubStars.vue' import { onMounted, ref, watch } from 'vue' import { Setting } from '@element-plus/icons-vue' @@ -29,12 +30,14 @@ const lineHeight = ref(DEFAULT_LINE_HEIGHT) const isHydrated = ref(false) const clampFontSize = (value) => { + if (value === null || value === undefined || value === '') return DEFAULT_FONT_SIZE const numeric = Number(value) if (!Number.isFinite(numeric)) return DEFAULT_FONT_SIZE return Math.min(MAX_FONT_SIZE, Math.max(MIN_FONT_SIZE, numeric)) } const clampLineHeight = (value) => { + if (value === null || value === undefined || value === '') return DEFAULT_LINE_HEIGHT const numeric = Number(value) if (!Number.isFinite(numeric)) return DEFAULT_LINE_HEIGHT return Math.min(MAX_LINE_HEIGHT, Math.max(MIN_LINE_HEIGHT, numeric)) @@ -94,6 +97,7 @@ watch(lineHeight, (next) => {