Skip to content

Commit

Permalink
vuepress
Browse files Browse the repository at this point in the history
  • Loading branch information
sindorei committed Nov 15, 2024
1 parent ad6f9cd commit 5045041
Show file tree
Hide file tree
Showing 5 changed files with 1,644 additions and 1,028 deletions.
5 changes: 4 additions & 1 deletion docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { defineUserConfig, defaultTheme } from 'vuepress'
import { defineUserConfig } from 'vuepress'
import { defaultTheme } from '@vuepress/theme-default'
import { viteBundler } from '@vuepress/bundler-vite'
import { sidebar } from './sidebar'
export default defineUserConfig({
lang: 'zh-CN',
title: '笔记',
description: '学习及练习的记录',
base: '/note/',
bundler: viteBundler(),
theme: defaultTheme({
sidebarDepth: 1,
sidebar,
Expand Down
4 changes: 1 addition & 3 deletions docs/.vuepress/sidebar.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import type { SidebarConfig } from '@vuepress/theme-default'

export const sidebar: SidebarConfig = {
export const sidebar = {
'/frontend/': [
{
text: 'JavaScript设计模式',
Expand Down
13 changes: 6 additions & 7 deletions docs/.vuepress/styles/index.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
html.dark{
--c-brand: #11a8cd;
--c-text-lighter: #0497c3;
--c-bg: #1e1e22;
--c-bg-sidebar: #27272b;
--c-bg-light: #303843; // 代码浅色背景,单行代码使用
}
html[data-theme=dark] {
--vp-c-accent-bg: #11a8cd;
--vp-c-accent: #0497c3;
--vp-c-bg: #1e1e22;
--vp-sidebar-c-bg: #27272b;
}
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
"docs:build": "vuepress build docs"
},
"devDependencies": {
"vuepress": "^2.0.0-beta.66"
"@vuepress/bundler-vite": "^2.0.0-rc.18",
"@vuepress/theme-default": "^2.0.0-rc.60",
"sass-embedded": "^1.81.0",
"vuepress": "2.0.0-rc.18"
}
}
Loading

0 comments on commit 5045041

Please sign in to comment.