diff --git a/README.md b/README.md index e362576..087d100 100644 --- a/README.md +++ b/README.md @@ -67,8 +67,7 @@ [](https://vercel.com/new/clone?repository-url=https://github.com/uxiaohan/vhAstro-Theme) - -### 使用命令 +### 使用命令拉取模板 ```bash # pnpm @@ -81,6 +80,8 @@ yarn create astro --template uxiaohan/vhAstro-Theme npm create astro@latest -- --template uxiaohan/vhAstro-Theme ``` +### 本地开发 + ```bash # 安装依赖 pnpm install @@ -306,10 +307,6 @@ export default { AsideShow: { // 是否展示个人网站 WebSitesShow: true, - // 是否展示公告 - TipsShow: true, - // 是否展示数量统计 - CountShow: true, // 是否展示分类 CategoriesShow: true, // 是否展示个人标签 diff --git a/src/config.ts b/src/config.ts index f2aa881..600a996 100644 --- a/src/config.ts +++ b/src/config.ts @@ -121,5 +121,7 @@ export default { AliPay: '/assets/images/alipay.webp', // 微信收款码 WeChat: '/assets/images/wechat.webp' - } + }, + // 页面阻尼滚动速度 + ScrollSpeed: 666 } \ No newline at end of file diff --git a/src/content/blog/Astro主题优雅的vhAstro-Theme.md b/src/content/blog/Astro主题优雅的vhAstro-Theme.md index b77bdae..a3f9a20 100644 --- a/src/content/blog/Astro主题优雅的vhAstro-Theme.md +++ b/src/content/blog/Astro主题优雅的vhAstro-Theme.md @@ -243,26 +243,40 @@ export default { ## ⚙️ 项目配置 ```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', + // 网站座右铭 + Motto: '运气是计划之外的东西.', // Cover 网站缩略图 Cover: '/assets/images/banner/072c12ec85d2d3b5.webp', - // 网站创建时间 - CreateTime: '2021-09-01', + // 网站侧边栏公告 (不填写即不开启) + Tips: '
欢迎光临我的博客 🎉
这里会分享我的日常和学习中的收集、整理及总结,希望能对你有所帮助:) 💖
', // 首页打字机文案列表 TypeWriteList: [ '不曾与你分享的时间,我在进步.', "I am making progress in the time I haven't shared with you.", ], + // 网站创建时间 + CreateTime: '2021-09-01', // 顶部 Banner 配置 HomeBanner: { 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: { @@ -280,7 +294,7 @@ export default { }, // 导航栏 (新窗口打开 newWindow: true) Navs: [ - // 仅支持 SVG 且 SVG 需放在 public/assets/images/svg/ 目录下,填入文件名即可(封装了 SVG 组件 为了极致压缩 SVG) + // 仅支持 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' }, @@ -292,7 +306,7 @@ export default { ], // 侧边栏个人网站 WebSites: [ - // 仅支持 SVG 且 SVG 需放在 public/assets/images/svg/ 目录下,填入文件名即可(封装了 SVG 组件 为了极致压缩 SVG) + // 仅支持 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' }, @@ -304,13 +318,9 @@ export default { AsideShow: { // 是否展示个人网站 WebSitesShow: true, - // 是否展示公告 - TipsShow: true, - // 是否展示数量统计 - CountShow: true, // 是否展示分类 CategoriesShow: true, - // 是否展示个人标签 + // 是否展示标签 TagsShow: true, // 是否展示推荐文章 recommendArticleShow: true @@ -318,6 +328,7 @@ export default { // DNS预解析地址 DNSOptimization: [ 'https://i0.wp.com', + 'https://cn.cravatar.com', 'https://analytics.vvhan.com', 'https://vh-api.4ce.cn', 'https://registry.npmmirror.com', @@ -342,11 +353,11 @@ export default { HanAnalytics: { enable: true, server: 'https://analytics.vvhan.com', siteId: 'Hello-HanHexoBlog' }, // Google 广告 GoogleAds: { - ad_Client: 'ca-pub-xxxxxxxxxx', + ad_Client: '', //ca-pub-xxxxxx // 侧边栏广告(不填不开启) - asideAD_Slot: ``, + asideAD_Slot: ``, // 文章页广告(不填不开启) - articleAD_Slot: `` + articleAD_Slot: `` }, // 文章内赞赏码 Reward: { @@ -354,7 +365,9 @@ export default { AliPay: '/assets/images/alipay.webp', // 微信收款码 WeChat: '/assets/images/wechat.webp' - } + }, + // 页面阻尼滚动速度 + ScrollSpeed: 666 } ``` diff --git a/src/scripts/Smoothscroll.ts b/src/scripts/Smoothscroll.ts index bbff9d3..fe9912b 100644 --- a/src/scripts/Smoothscroll.ts +++ b/src/scripts/Smoothscroll.ts @@ -1,7 +1,8 @@ +import SITE_INFO from '@/config' // SmoothScroll 滚动优化 import { LoadScript } from "@/utils/index"; declare const SmoothScroll: any; export default async () => { await LoadScript("/assets/js/smoothscroll.min.js"); - SmoothScroll({ stepSize: 118, animationTime: 666 }) + SmoothScroll({ stepSize: 118, animationTime: SITE_INFO.ScrollSpeed }) }; \ No newline at end of file