mirror of
https://github.com/ZiuChen/ZiuChen.github.io.git
synced 2025-08-17 23:19:55 +08:00
chore: 精简Vitepress配置
This commit is contained in:
parent
dfbc87bad9
commit
045423ce7f
@ -1,5 +1,6 @@
|
||||
import { defineConfig } from 'vitepress'
|
||||
import generateSideBar from './scripts/generateSideBar'
|
||||
import { projects, works, notes, JUEJIN } from './const'
|
||||
|
||||
export default defineConfig({
|
||||
title: 'ZiuChen',
|
||||
@ -16,29 +17,15 @@ export default defineConfig({
|
||||
{ text: '首页', link: '/' },
|
||||
{
|
||||
text: '我的项目',
|
||||
items: [
|
||||
{ text: '超级剪贴板', link: '/project/ClipboardManager/' },
|
||||
{ text: '超级Markdown', link: '/project/Markdown/' },
|
||||
{ text: '超级JavaScript', link: '/project/JSRunner/' },
|
||||
{ text: '超级分词', link: '/project/SmartWordBreak/' }
|
||||
]
|
||||
items: projects
|
||||
},
|
||||
{
|
||||
text: '开源作品',
|
||||
items: [
|
||||
{ text: '个人作品', link: '/works/opensource' },
|
||||
{ text: '社区贡献', link: '/works/contribution' }
|
||||
]
|
||||
items: works
|
||||
},
|
||||
{
|
||||
text: '学习笔记',
|
||||
items: [
|
||||
{ text: 'JavaScript基础', link: '/note/JavaScript' },
|
||||
{ text: 'CSS基础', link: '/note/CSS' },
|
||||
{ text: 'JavaScript进阶', link: '/note/JavaScriptEnhanced' },
|
||||
{ text: '前端工程化', link: '/note/Front-end Engineering' },
|
||||
{ text: '服务端渲染', link: '/note/SSR' }
|
||||
]
|
||||
items: notes
|
||||
},
|
||||
{
|
||||
text: '个人介绍',
|
||||
@ -48,45 +35,28 @@ export default defineConfig({
|
||||
sidebar: [
|
||||
{
|
||||
text: '我的项目',
|
||||
collapsible: true,
|
||||
items: [
|
||||
{ text: '超级剪贴板', link: '/project/ClipboardManager/' },
|
||||
{ text: '超级Markdown', link: '/project/Markdown/' },
|
||||
{ text: '超级JavaScript', link: '/project/JSRunner/' },
|
||||
{ text: '超级分词', link: '/project/SmartWordBreak/' }
|
||||
]
|
||||
items: projects
|
||||
},
|
||||
{
|
||||
text: '开源作品',
|
||||
collapsible: true,
|
||||
items: [
|
||||
{ text: '个人作品', link: '/works/opensource' },
|
||||
{ text: '社区贡献', link: '/works/contribution' }
|
||||
]
|
||||
collapsed: true,
|
||||
items: works
|
||||
},
|
||||
{
|
||||
text: '文章归档',
|
||||
collapsible: true,
|
||||
collapsed: true,
|
||||
items: [...generateSideBar()]
|
||||
},
|
||||
{
|
||||
text: '学习笔记',
|
||||
collapsible: true,
|
||||
items: [
|
||||
{ text: 'JavaScript基础', link: '/note/JavaScript' },
|
||||
{ text: 'CSS基础', link: '/note/CSS' },
|
||||
{ text: 'JavaScript进阶', link: '/note/JavaScriptEnhanced' },
|
||||
{ text: '前端工程化', link: '/note/Front-end Engineering' },
|
||||
{ text: '服务端渲染', link: '/note/SSR' }
|
||||
]
|
||||
collapsed: true,
|
||||
items: notes
|
||||
}
|
||||
],
|
||||
socialLinks: [
|
||||
{ icon: 'github', link: 'https://github.com/ZiuChen' },
|
||||
{
|
||||
icon: {
|
||||
svg: '<svg width="36" height="28" viewBox="0 0 36 28" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M17.5875 6.77268L21.8232 3.40505L17.5875 0.00748237L17.5837 0L13.3555 3.39757L17.5837 6.76894L17.5875 6.77268ZM17.5863 17.3955H17.59L28.5161 8.77432L25.5526 6.39453L17.59 12.6808H17.5863L17.5825 12.6845L9.61993 6.40201L6.66016 8.78181L17.5825 17.3992L17.5863 17.3955ZM17.5828 23.2891L17.5865 23.2854L32.2133 11.7456L35.1768 14.1254L28.5238 19.3752L17.5865 28L0.284376 14.3574L0 14.1291L2.95977 11.7531L17.5828 23.2891Z" fill="#1E80FF"/></svg>'
|
||||
},
|
||||
icon: { svg: JUEJIN },
|
||||
link: 'https://juejin.cn/user/1887205216238477'
|
||||
}
|
||||
],
|
||||
|
1
docs/.vitepress/const/icons.ts
Normal file
1
docs/.vitepress/const/icons.ts
Normal file
@ -0,0 +1 @@
|
||||
export const JUEJIN = `<svg width="36" height="28" viewBox="0 0 36 28" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M17.5875 6.77268L21.8232 3.40505L17.5875 0.00748237L17.5837 0L13.3555 3.39757L17.5837 6.76894L17.5875 6.77268ZM17.5863 17.3955H17.59L28.5161 8.77432L25.5526 6.39453L17.59 12.6808H17.5863L17.5825 12.6845L9.61993 6.40201L6.66016 8.78181L17.5825 17.3992L17.5863 17.3955ZM17.5828 23.2891L17.5865 23.2854L32.2133 11.7456L35.1768 14.1254L28.5238 19.3752L17.5865 28L0.284376 14.3574L0 14.1291L2.95977 11.7531L17.5828 23.2891Z" fill="#1E80FF"/></svg>`
|
2
docs/.vitepress/const/index.ts
Normal file
2
docs/.vitepress/const/index.ts
Normal file
@ -0,0 +1,2 @@
|
||||
export * from './links'
|
||||
export * from './icons'
|
20
docs/.vitepress/const/links.ts
Normal file
20
docs/.vitepress/const/links.ts
Normal file
@ -0,0 +1,20 @@
|
||||
export const projects = [
|
||||
{ text: '超级剪贴板', link: '/project/ClipboardManager/' },
|
||||
{ text: '超级Markdown', link: '/project/Markdown/' },
|
||||
{ text: '超级JavaScript', link: '/project/JSRunner/' },
|
||||
{ text: '超级分词', link: '/project/SmartWordBreak/' }
|
||||
]
|
||||
|
||||
export const works = [
|
||||
{ text: '个人作品', link: '/works/opensource' },
|
||||
{ text: '社区贡献', link: '/works/contribution' }
|
||||
]
|
||||
|
||||
export const notes = [
|
||||
{ text: 'JavaScript基础', link: '/note/JavaScript' },
|
||||
{ text: 'CSS基础', link: '/note/CSS' },
|
||||
{ text: 'JavaScript进阶', link: '/note/JavaScriptEnhanced' },
|
||||
{ text: '前端工程化', link: '/note/Front-end Engineering' },
|
||||
{ text: '服务端渲染', link: '/note/SSR' },
|
||||
{ text: 'React基础', link: '/note/React' }
|
||||
]
|
Loading…
x
Reference in New Issue
Block a user