完善文档

This commit is contained in:
Han 2025-04-02 19:03:51 +08:00
parent 88f876891f
commit 18ae1b240b
2 changed files with 129 additions and 9 deletions

View File

@ -14,7 +14,7 @@
- [x] 简洁的响应式设计 - [x] 简洁的响应式设计
- [x] 流畅的动画和页面过渡 - [x] 流畅的动画和页面过渡
- [x] 丝滑的阻尼滚动效果(自定义开启/关闭) - [x] 丝滑的阻尼滚动效果
- [x] 顶部Banner - [x] 顶部Banner
- [x] 两列布局 - [x] 两列布局
- [x] 阅读时间 - [x] 阅读时间

View File

@ -1,12 +1,7 @@
--- ---
title: "Astro主题-优雅的vhAstro-Theme【使用文档】" title: "Astro主题-优雅的vhAstro-Theme【使用文档】"
categories: Code categories: Code
tags: tags: ["Astro", "主题", "博客", "vhAstro", "vhAstro-Theme"]
- Astro
- 主题
- 博客
- vhAstro
- vhAstro-Theme
id: "astro-theme-vhastro-theme" id: "astro-theme-vhastro-theme"
date: 2025-03-02 18:18:18 date: 2025-03-02 18:18:18
cover: "https://i0.wp.com/uxiaohan.github.io/v2/2025/03/1740977096666.webp" cover: "https://i0.wp.com/uxiaohan.github.io/v2/2025/03/1740977096666.webp"
@ -36,6 +31,8 @@ top: true
- [x] 简洁的响应式设计 - [x] 简洁的响应式设计
- [x] 流畅的动画和页面过渡 - [x] 流畅的动画和页面过渡
- [x] 丝滑的阻尼滚动效果
- [x] 顶部Banner
- [x] 两列布局 - [x] 两列布局
- [x] 阅读时间 - [x] 阅读时间
- [x] 字数统计 - [x] 字数统计
@ -44,18 +41,23 @@ top: true
- [x] 图片懒加载 - [x] 图片懒加载
- [x] 图片灯箱 - [x] 图片灯箱
- [x] LivePhoto - [x] LivePhoto
- [x] LaTex数学公式 - [x] LaTex 数学公式
- [x] 赞赏功能 - [x] 赞赏功能
- [x] 评论 - 内置【Twikoo、Waline】 - [x] 评论 - 内置【Twikoo、Waline】
- [x] 本地搜索 - [x] 本地搜索
- [x] 公告
- [x] 标签 - [x] 标签
- [x] 分类 - [x] 分类
- [x] 归档 - [x] 归档
- [x] 动态 - [x] 动态
- [x] 圈子
- [x] 关于 - [x] 关于
- [x] 留言板
- [x] 友情链接 - [x] 友情链接
- [x] 推荐文章 - [x] 推荐文章
- [x] 置顶文章
- [x] 谷歌广告 - [x] 谷歌广告
- [x] 侧边栏选择性展示
- [x] 内置 404 页面 - [x] 内置 404 页面
- [x] Sitemap 支持 - [x] Sitemap 支持
- [x] RSS 支持 - [x] RSS 支持
@ -75,7 +77,7 @@ top: true
- 部署前需编辑 `astro.config.mjs` 中的站点设置。 - 部署前需编辑 `astro.config.mjs` 中的站点设置。
## ⚙️ 文章格式 ## 📄 文章格式
```md ```md
--- ---
@ -238,6 +240,124 @@ export default {
└── pnpm-lock.yaml => 依赖锁定文件 └── pnpm-lock.yaml => 依赖锁定文件
``` ```
## ⚙️ 项目配置
```js
export default {
Title: '韩小韩博客',
Site: 'https://www.vvhan.com',
Subtitle: '不曾与你分享的时间,我在进步.',
Description: '韩小韩博客 专注于前开发与相关技术的实战分享涵盖Vue框架、Node.js、Serverless等并涉及Node、Python、Linux、Docker等领域。同时博客也分享作者的生活、音乐和旅行的热爱。',
Author: '.𝙃𝙖𝙣',
Motto: '运气是计划之外的东西.',
Avatar: 'https://q1.qlogo.cn/g?b=qq&nk=1655466387&s=640',
// Cover 网站缩略图
Cover: '/assets/images/banner/072c12ec85d2d3b5.webp',
// 网站创建时间
CreateTime: '2021-09-01',
// 首页打字机文案列表
TypeWriteList: [
'不曾与你分享的时间,我在进步.',
"I am making progress in the time I haven't shared with you.",
],
// 顶部 Banner 配置
HomeBanner: {
enable: true,
cover: '/assets/images/home-banner.webp'
},
// 博客主题配置
Theme: {
// 颜色请用 16 进制颜色码
// 主题颜色
"--vh-main-color": "#01C4B6",
// 字体颜色
"--vh-font-color": "#34495e",
// 侧边栏宽度
"--vh-aside-width": "318px",
// 全局圆角
"--vh-main-radius": "0.88rem",
// 主体内容宽度
"--vh-main-max-width": "1458px",
},
// 导航栏 (新窗口打开 newWindow: true)
Navs: [
// 仅支持 SVG 且 SVG 需放在 public/assets/images/svg/ 目录下,填入文件名即可(封装了 SVG 组件 为了极致压缩 SVG
// 建议使用 https://tabler.io/icons 直接下载 SVG
{ text: '朋友', link: '/links', icon: 'Nav_friends' },
{ text: '圈子', link: '/friends', icon: 'Nav_rss' },
{ text: '动态', link: '/talking', icon: 'Nav_talking' },
{ text: '昔日', link: '/archives', icon: 'Nav_archives' },
{ text: '留言', link: '/message', icon: 'Nav_message' },
{ text: '关于', link: '/about', icon: 'Nav_about' },
{ text: 'API', link: 'https://api.vvhan.com/', target: true, icon: 'Nav_link' },
],
// 侧边栏个人网站
WebSites: [
// 仅支持 SVG 且 SVG 需放在 public/assets/images/svg/ 目录下,填入文件名即可(封装了 SVG 组件 为了极致压缩 SVG
// 建议使用 https://tabler.io/icons 直接下载 SVG
{ text: 'Github', link: 'https://github.com/uxiaohan', icon: 'WebSite_github' },
{ text: '韩小韩API', link: 'https://api.vvhan.com', icon: 'WebSite_api' },
{ text: '每日热榜', link: 'https://hot.vvhan.com', icon: 'WebSite_hot' },
{ text: '骤雨重山图床', link: 'https://wp-cdn.4ce.cn', icon: 'WebSite_img' },
{ text: 'HanAnalytics', link: 'https://analytics.vvhan.com', icon: 'WebSite_analytics' },
],
// 侧边栏展示
AsideShow: {
// 是否展示个人网站
WebSitesShow: true,
// 是否展示公告
TipsShow: true,
// 是否展示数量统计
CountShow: true,
// 是否展示分类
CategoriesShow: true,
// 是否展示个人标签
TagsShow: true,
// 是否展示推荐文章
recommendArticleShow: true
},
// DNS预解析地址
DNSOptimization: [
'https://i0.wp.com',
'https://analytics.vvhan.com',
'https://vh-api.4ce.cn',
'https://registry.npmmirror.com',
'https://pagead2.googlesyndication.com'
],
// 博客音乐组件解析接口
vhMusicApi: 'https://vh-api.4ce.cn/blog/meting',
// 评论组件(只允许同时开启一个)
Comment: {
// Twikoo 评论
Twikoo: {
enable: false,
envId: ''
},
// Waline 评论
Waline: {
enable: false,
serverURL: ''
}
},
// Han Analytics 统计https://github.com/uxiaohan/HanAnalytics
HanAnalytics: { enable: true, server: 'https://analytics.vvhan.com', siteId: 'Hello-HanHexoBlog' },
// Google 广告
GoogleAds: {
ad_Client: 'ca-pub-xxxxxxxxxx',
// 侧边栏广告(不填不开启)
asideAD_Slot: `<ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-xxxxxxxxxx" data-ad-slot="xxxxxx" data-ad-format="auto" data-full-width-responsive="true"></ins>`,
// 文章页广告(不填不开启)
articleAD_Slot: `<ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-xxxxxxxxxx" data-ad-slot="xxxxxx" data-ad-format="auto" data-full-width-responsive="true"></ins>`
},
// 文章内赞赏码
Reward: {
// 支付宝收款码
AliPay: '/assets/images/alipay.webp',
// 微信收款码
WeChat: '/assets/images/wechat.webp'
}
}
```
## 🌈 组件 ## 🌈 组件
### 文本加粗 ### 文本加粗