完善文档

This commit is contained in:
Han 2025-04-07 11:48:32 +08:00
parent d0cafa72de
commit b7afb06916
4 changed files with 36 additions and 23 deletions

View File

@ -67,8 +67,7 @@
[![vhAstro-Theme](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/uxiaohan/vhAstro-Theme) [![vhAstro-Theme](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/uxiaohan/vhAstro-Theme)
### 使用命令拉取模板
### 使用命令
```bash ```bash
# pnpm # pnpm
@ -81,6 +80,8 @@ yarn create astro --template uxiaohan/vhAstro-Theme
npm create astro@latest -- --template uxiaohan/vhAstro-Theme npm create astro@latest -- --template uxiaohan/vhAstro-Theme
``` ```
### 本地开发
```bash ```bash
# 安装依赖 # 安装依赖
pnpm install pnpm install
@ -306,10 +307,6 @@ export default {
AsideShow: { AsideShow: {
// 是否展示个人网站 // 是否展示个人网站
WebSitesShow: true, WebSitesShow: true,
// 是否展示公告
TipsShow: true,
// 是否展示数量统计
CountShow: true,
// 是否展示分类 // 是否展示分类
CategoriesShow: true, CategoriesShow: true,
// 是否展示个人标签 // 是否展示个人标签

View File

@ -121,5 +121,7 @@ export default {
AliPay: '/assets/images/alipay.webp', AliPay: '/assets/images/alipay.webp',
// 微信收款码 // 微信收款码
WeChat: '/assets/images/wechat.webp' WeChat: '/assets/images/wechat.webp'
} },
// 页面阻尼滚动速度
ScrollSpeed: 666
} }

View File

@ -243,26 +243,40 @@ export default {
## ⚙️ 项目配置 ## ⚙️ 项目配置
```js ```js
export default { export default {
// 网站标题
Title: '韩小韩博客', Title: '韩小韩博客',
// 网站地址
Site: 'https://www.vvhan.com', Site: 'https://www.vvhan.com',
// 网站副标题
Subtitle: '不曾与你分享的时间,我在进步.', Subtitle: '不曾与你分享的时间,我在进步.',
// 网站描述
Description: '韩小韩博客 专注于前开发与相关技术的实战分享涵盖Vue框架、Node.js、Serverless等并涉及Node、Python、Linux、Docker等领域。同时博客也分享作者的生活、音乐和旅行的热爱。', Description: '韩小韩博客 专注于前开发与相关技术的实战分享涵盖Vue框架、Node.js、Serverless等并涉及Node、Python、Linux、Docker等领域。同时博客也分享作者的生活、音乐和旅行的热爱。',
// 网站作者
Author: '.𝙃𝙖𝙣', Author: '.𝙃𝙖𝙣',
Motto: '运气是计划之外的东西.', // 作者头像
Avatar: 'https://q1.qlogo.cn/g?b=qq&nk=1655466387&s=640', Avatar: 'https://q1.qlogo.cn/g?b=qq&nk=1655466387&s=640',
// 网站座右铭
Motto: '运气是计划之外的东西.',
// Cover 网站缩略图 // Cover 网站缩略图
Cover: '/assets/images/banner/072c12ec85d2d3b5.webp', Cover: '/assets/images/banner/072c12ec85d2d3b5.webp',
// 网站创建时间 // 网站侧边栏公告 (不填写即不开启)
CreateTime: '2021-09-01', Tips: '<p>欢迎光临我的博客 🎉</p><p>这里会分享我的日常和学习中的收集、整理及总结,希望能对你有所帮助:) 💖</p>',
// 首页打字机文案列表 // 首页打字机文案列表
TypeWriteList: [ TypeWriteList: [
'不曾与你分享的时间,我在进步.', '不曾与你分享的时间,我在进步.',
"I am making progress in the time I haven't shared with you.", "I am making progress in the time I haven't shared with you.",
], ],
// 网站创建时间
CreateTime: '2021-09-01',
// 顶部 Banner 配置 // 顶部 Banner 配置
HomeBanner: { HomeBanner: {
enable: true, enable: true,
cover: '/assets/images/home-banner.webp' // 首页高度
HomeHeight: '38.88rem',
// 其他页面高度
PageHeight: '28.88rem',
// 背景
background: "url('/assets/images/home-banner.webp') no-repeat center 60%/cover",
}, },
// 博客主题配置 // 博客主题配置
Theme: { Theme: {
@ -280,7 +294,7 @@ export default {
}, },
// 导航栏 (新窗口打开 newWindow: true) // 导航栏 (新窗口打开 newWindow: true)
Navs: [ Navs: [
// 仅支持 SVG 且 SVG 需放在 public/assets/images/svg/ 目录下,填入文件名即可(封装了 SVG 组件 为了极致压缩 SVG // 仅支持 SVG 且 SVG 需放在 public/assets/images/svg/ 目录下,填入文件名即可 <不需要文件后缀名>(封装了 SVG 组件 为了极致压缩 SVG
// 建议使用 https://tabler.io/icons 直接下载 SVG // 建议使用 https://tabler.io/icons 直接下载 SVG
{ text: '朋友', link: '/links', icon: 'Nav_friends' }, { text: '朋友', link: '/links', icon: 'Nav_friends' },
{ text: '圈子', link: '/friends', icon: 'Nav_rss' }, { text: '圈子', link: '/friends', icon: 'Nav_rss' },
@ -292,7 +306,7 @@ export default {
], ],
// 侧边栏个人网站 // 侧边栏个人网站
WebSites: [ WebSites: [
// 仅支持 SVG 且 SVG 需放在 public/assets/images/svg/ 目录下,填入文件名即可(封装了 SVG 组件 为了极致压缩 SVG // 仅支持 SVG 且 SVG 需放在 public/assets/images/svg/ 目录下,填入文件名即可 <不需要文件后缀名>(封装了 SVG 组件 为了极致压缩 SVG
// 建议使用 https://tabler.io/icons 直接下载 SVG // 建议使用 https://tabler.io/icons 直接下载 SVG
{ text: 'Github', link: 'https://github.com/uxiaohan', icon: 'WebSite_github' }, { text: 'Github', link: 'https://github.com/uxiaohan', icon: 'WebSite_github' },
{ text: '韩小韩API', link: 'https://api.vvhan.com', icon: 'WebSite_api' }, { text: '韩小韩API', link: 'https://api.vvhan.com', icon: 'WebSite_api' },
@ -304,13 +318,9 @@ export default {
AsideShow: { AsideShow: {
// 是否展示个人网站 // 是否展示个人网站
WebSitesShow: true, WebSitesShow: true,
// 是否展示公告
TipsShow: true,
// 是否展示数量统计
CountShow: true,
// 是否展示分类 // 是否展示分类
CategoriesShow: true, CategoriesShow: true,
// 是否展示个人标签 // 是否展示标签
TagsShow: true, TagsShow: true,
// 是否展示推荐文章 // 是否展示推荐文章
recommendArticleShow: true recommendArticleShow: true
@ -318,6 +328,7 @@ export default {
// DNS预解析地址 // DNS预解析地址
DNSOptimization: [ DNSOptimization: [
'https://i0.wp.com', 'https://i0.wp.com',
'https://cn.cravatar.com',
'https://analytics.vvhan.com', 'https://analytics.vvhan.com',
'https://vh-api.4ce.cn', 'https://vh-api.4ce.cn',
'https://registry.npmmirror.com', 'https://registry.npmmirror.com',
@ -342,11 +353,11 @@ export default {
HanAnalytics: { enable: true, server: 'https://analytics.vvhan.com', siteId: 'Hello-HanHexoBlog' }, HanAnalytics: { enable: true, server: 'https://analytics.vvhan.com', siteId: 'Hello-HanHexoBlog' },
// Google 广告 // Google 广告
GoogleAds: { GoogleAds: {
ad_Client: 'ca-pub-xxxxxxxxxx', ad_Client: '', //ca-pub-xxxxxx
// 侧边栏广告(不填不开启) // 侧边栏广告(不填不开启)
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>`, asideAD_Slot: `<ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-xxxxxx" 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>` articleAD_Slot: `<ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-xxxxxx" data-ad-slot="xxxxxx" data-ad-format="auto" data-full-width-responsive="true"></ins>`
}, },
// 文章内赞赏码 // 文章内赞赏码
Reward: { Reward: {
@ -354,7 +365,9 @@ export default {
AliPay: '/assets/images/alipay.webp', AliPay: '/assets/images/alipay.webp',
// 微信收款码 // 微信收款码
WeChat: '/assets/images/wechat.webp' WeChat: '/assets/images/wechat.webp'
} },
// 页面阻尼滚动速度
ScrollSpeed: 666
} }
``` ```

View File

@ -1,7 +1,8 @@
import SITE_INFO from '@/config'
// SmoothScroll 滚动优化 // SmoothScroll 滚动优化
import { LoadScript } from "@/utils/index"; import { LoadScript } from "@/utils/index";
declare const SmoothScroll: any; declare const SmoothScroll: any;
export default async () => { export default async () => {
await LoadScript("/assets/js/smoothscroll.min.js"); await LoadScript("/assets/js/smoothscroll.min.js");
SmoothScroll({ stepSize: 118, animationTime: 666 }) SmoothScroll({ stepSize: 118, animationTime: SITE_INFO.ScrollSpeed })
}; };