feat:增加字体

This commit is contained in:
2025-11-27 14:44:19 +08:00
parent c064dfc417
commit daab0c4495
21 changed files with 1045 additions and 125 deletions

View File

@@ -2,8 +2,11 @@ import { defineConfig } from 'vitepress'
// https://vitepress.dev/reference/site-config
export default defineConfig({
title: "Cxx0822",
title: "拾光记",
description: "Cxx0822 Blog",
head: [
['link', { rel: 'icon', href: '/blog-press/favicon.ico' }]
],
base: '/blog-press/',
lang: 'zh-CN',
locales: {
@@ -13,19 +16,22 @@ export default defineConfig({
},
},
themeConfig: {
logo: "/logo.png",
// https://vitepress.dev/reference/default-theme-config
nav: [
{ text: 'Home', link: '/' },
{ text: 'Web', link: '/Web/' },
{ text: 'Web后端', link: '/Web-Backend/' },
{ text: 'DevOps', link: '/DevOps/' },
{ text: 'SpringBoot', link: '/SpringBoot/' }
{ text: 'SpringBoot', link: '/SpringBoot/' },
],
sidebar: {
'/Web/': [
'/Web-Backend/': [
{
text: 'Web',
text: 'Web后端',
items: [
{ text: 'MySQL知识点', link: '/Web/MySQL-Knowledge' }
{ text: 'MySQL知识点', link: '/Web-Backend/MySQL-Knowledge' },
{ text: 'Flyway简单使用', link: '/Web-Backend/Flyway' },
{ text: 'MyBatis简介和使用', link: '/Web-Backend/MyBatis' }
]
},
],
@@ -44,7 +50,11 @@ export default defineConfig({
text: 'SpringBoot',
items: [
{ text: 'Spring IOC简介', link: '/SpringBoot/SpringIOC' },
{ text: 'SpringBoot启动流程', link: '/SpringBoot/SpringBoot-Start-Process' }
{ text: 'SpringBoot启动流程', link: '/SpringBoot/SpringBoot-Start-Process' },
{ text: 'Spring MVC简介', link: '/SpringBoot/SpringMVC' },
{ text: 'SpringBoot Starter原理', link: '/SpringBoot/SpringBootStarter' },
{ text: 'SpringBoot Bean简介', link: '/SpringBoot/SpringBootBean' },
{ text: 'SpringBoot3原生镜像', link: '/SpringBoot/SpringBoot3-GraalVM' }
]
}
]
@@ -93,6 +103,9 @@ export default defineConfig({
next: '下一篇'
},
sidebarMenuLabel: '菜单',
darkModeSwitchLabel: '外观',
lastUpdated: {
text: '最后更新于'
}

View File

@@ -0,0 +1,27 @@
<template>
<div class="custom-component">
<h3>{{ title }}</h3>
<p>{{ description }}</p>
<button @click="count++">点击次数: {{ count }}</button>
</div>
</template>
<script setup>
import { ref } from 'vue'
const props = defineProps({
title: String,
description: String
})
const count = ref(0)
</script>
<style scoped>
.custom-component {
border: 1px solid #e2e2e2;
padding: 1rem;
border-radius: 8px;
margin: 1rem 0;
}
</style>

Binary file not shown.

View File

@@ -0,0 +1,12 @@
import DefaultTheme from 'vitepress/theme'
import '../theme/style.css'
// 定义组件导入的类型
interface ComponentModule {
default: any
}
export default {
extends: DefaultTheme
}

View File

@@ -0,0 +1,19 @@
@font-face {
font-family: 'CustomFont';
src: url('./fonts/custom.woff2') format('woff2');
font-display: swap;
}
:root {
--vp-font-family-base: 'CustomFont', -apple-system, BlinkMacSystemFont,
'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
--vp-font-family-mono: 'CustomFont', 'Fira Code', 'Consolas', monospace;
}
:root {
--vp-c-brand: #10b981;
--vp-c-brand-light: #34d399;
--vp-c-brand-lighter: #6ee7b7;
--vp-c-brand-dark: #059669;
--vp-c-brand-darker: #047857;
}