diff --git a/src/content/posts/2025/2025.08/add-ai-summary.md b/src/content/posts/2025/2025.08/add-ai-summary.md index 7982202..d09a55c 100644 --- a/src/content/posts/2025/2025.08/add-ai-summary.md +++ b/src/content/posts/2025/2025.08/add-ai-summary.md @@ -9,6 +9,11 @@ summary: >- 这篇文章介绍了如何在Hexo博客中添加AI摘要功能,作者寻找并尝试了多个AI摘要插件后,最终选择了hexo-ai-summary-liushen插件。安装过程中,作者详细说明了如何安装额外依赖,并在Hexo配置文件中添加了相关配置。文章还提供了关于内容清洗、摘要字段设置、日志等级、API接口配置、插件适配等方面的详细说明和配置示例。此外,作者还介绍了如何将AI摘要集成到Hexo主题中,并提供了相关的CSS样式和JavaScript动效代码,以实现更加逼真的摘要效果。最后,作者提醒用户在运行插件前注意备份,并介绍了如何处理可能出现的缓存问题。 date: 2025-08-12 09:46:25 --- + +{% note warning %} +注意:本文为早期 Hexo / Butterfly 魔改记录,本站现已迁移到 Astro,相关代码、路径或插件可能已经失效,仅作历史参考。 +{% endnote %} + 之前在wordpress中看到过ai插件,现在使用hexo好像有洪墨AI,但是收费,有点负担不了,于是寻找代替品,真的找到了 {% link liushen开发的插件,ai-summary,https://blog.liushen.fun/posts/40702a0d/ %} diff --git a/src/content/posts/2025/2025.08/add-calendar-side.md b/src/content/posts/2025/2025.08/add-calendar-side.md index c10ff64..9ec6da9 100644 --- a/src/content/posts/2025/2025.08/add-calendar-side.md +++ b/src/content/posts/2025/2025.08/add-calendar-side.md @@ -8,6 +8,11 @@ summary: 实现了一个侧边栏日历与倒计时卡片,包含以下核心 abbrlink: 5ed2f1e6 date: 2026-01-16T15:47:07+08:00 --- + +{% note warning %} +注意:本文为早期 Hexo / Butterfly 魔改记录,本站现已迁移到 Astro,相关代码、路径或插件可能已经失效,仅作历史参考。 +{% endnote %} + 突然看到某个网站侧边栏有日历和倒计时,就研究了一下,抄下来了(🤭) 效果图: diff --git a/src/content/posts/2025/2025.08/add-welcome-message-in-sidebar.md b/src/content/posts/2025/2025.08/add-welcome-message-in-sidebar.md index 0db34a2..8cb8dad 100644 --- a/src/content/posts/2025/2025.08/add-welcome-message-in-sidebar.md +++ b/src/content/posts/2025/2025.08/add-welcome-message-in-sidebar.md @@ -12,6 +12,10 @@ summary: >- date: 2025-08-10 19:30:40 --- +{% note warning %} +注意:本文为早期 Hexo / Butterfly 魔改记录,本站现已迁移到 Astro,相关代码、路径或插件可能已经失效,仅作历史参考。 +{% endnote %} + # 效果展示
效果展示
diff --git a/src/content/posts/2025/2025.08/custom-bottom.md b/src/content/posts/2025/2025.08/custom-bottom.md index 174e076..18bc6f7 100644 --- a/src/content/posts/2025/2025.08/custom-bottom.md +++ b/src/content/posts/2025/2025.08/custom-bottom.md @@ -10,6 +10,10 @@ summary: >- date: 2025-08-12 09:19:16 --- +{% note warning %} +注意:本文为早期 Hexo / Butterfly 魔改记录,本站现已迁移到 Astro,相关代码、路径或插件可能已经失效,仅作历史参考。 +{% endnote %} + # 安装 安装插件,在博客根目录[Blogroot]下打开终端,运行以下指令: diff --git a/src/content/posts/2025/2025.08/custom-category-bar.md b/src/content/posts/2025/2025.08/custom-category-bar.md index 6337ee2..0396f15 100644 --- a/src/content/posts/2025/2025.08/custom-category-bar.md +++ b/src/content/posts/2025/2025.08/custom-category-bar.md @@ -9,6 +9,10 @@ summary: >- date: 2025-08-14 16:25:49 --- +{% note warning %} +注意:本文为早期 Hexo / Butterfly 魔改记录,本站现已迁移到 Astro,相关代码、路径或插件可能已经失效,仅作历史参考。 +{% endnote %} + {% note warning 1 %} 修改有风险,请注意备份 {% endnote %} diff --git a/src/content/posts/2025/2025.08/custom-font.md b/src/content/posts/2025/2025.08/custom-font.md index 05723b5..25a66d2 100644 --- a/src/content/posts/2025/2025.08/custom-font.md +++ b/src/content/posts/2025/2025.08/custom-font.md @@ -10,6 +10,10 @@ summary: >- date: 2026-01-16 07:47:15 --- +{% note warning %} +注意:本文为早期 Hexo / Butterfly 魔改记录,本站现已迁移到 Astro,相关代码、路径或插件可能已经失效,仅作历史参考。 +{% endnote %} + 今天感觉网站的字体有些不好看,想换一下,搜索发现网站用woff或者woff2字体,在手机端和电脑都能完美显示 {% note no-icon %} 2026年2月3日更新:好像谷歌字体库可以在大陆直连了,速度也很快,所以这篇文章好像没什么必要了。 diff --git a/src/content/posts/2025/2025.08/custom-footer.md b/src/content/posts/2025/2025.08/custom-footer.md index e543cee..8114425 100644 --- a/src/content/posts/2025/2025.08/custom-footer.md +++ b/src/content/posts/2025/2025.08/custom-footer.md @@ -13,6 +13,10 @@ summary: >- date: 2025-08-14 17:05:27 --- +{% note warning %} +注意:本文为早期 Hexo / Butterfly 魔改记录,本站现已迁移到 Astro,相关代码、路径或插件可能已经失效,仅作历史参考。 +{% endnote %} + # 添加CSS {% note warning 1 %} 修改有风险,注意备份 diff --git a/src/content/posts/2025/2025.08/custom-navbar.md b/src/content/posts/2025/2025.08/custom-navbar.md index 8d4e643..7ac63b8 100644 --- a/src/content/posts/2025/2025.08/custom-navbar.md +++ b/src/content/posts/2025/2025.08/custom-navbar.md @@ -10,6 +10,10 @@ summary: >- date: 2025-08-13 16:12:25 --- +{% note warning %} +注意:本文为早期 Hexo / Butterfly 魔改记录,本站现已迁移到 Astro,相关代码、路径或插件可能已经失效,仅作历史参考。 +{% endnote %} + 最近在查找怎样自定义导航栏,奈何没有对应版本的修改教程,本站使用最新版butterfly5.4。 # PC 菜单栏 diff --git a/src/content/posts/2025/2025.08/custom-right-menu.md b/src/content/posts/2025/2025.08/custom-right-menu.md index 527b2b9..b729c06 100644 --- a/src/content/posts/2025/2025.08/custom-right-menu.md +++ b/src/content/posts/2025/2025.08/custom-right-menu.md @@ -10,6 +10,10 @@ summary: >- date: 2025-08-11 16:02:12 --- +{% note warning %} +注意:本文为早期 Hexo / Butterfly 魔改记录,本站现已迁移到 Astro,相关代码、路径或插件可能已经失效,仅作历史参考。 +{% endnote %} + # 演示 本站右键即可查看,和原有菜单相比比较美观 diff --git a/src/content/posts/2025/2025.08/go-to-random-page.md b/src/content/posts/2025/2025.08/go-to-random-page.md index 1e7621f..7fa2d86 100644 --- a/src/content/posts/2025/2025.08/go-to-random-page.md +++ b/src/content/posts/2025/2025.08/go-to-random-page.md @@ -10,6 +10,11 @@ summary: >- 以下是你提供的步骤的详细解释: date: 2025-08-12 15:15:32 --- + +{% note warning %} +注意:本文为早期 Hexo / Butterfly 魔改记录,本站现已迁移到 Astro,相关代码、路径或插件可能已经失效,仅作历史参考。 +{% endnote %} + 在网上查找博客美化过程时发现基本上都有“随便逛逛”的功能,于是自己也添加一个。 比较简单只有js代码,但是先要安装插件 diff --git a/src/content/posts/2025/2025.08/set-shuoshuo-page.md b/src/content/posts/2025/2025.08/set-shuoshuo-page.md index 8da3ba2..5e4f109 100644 --- a/src/content/posts/2025/2025.08/set-shuoshuo-page.md +++ b/src/content/posts/2025/2025.08/set-shuoshuo-page.md @@ -13,6 +13,11 @@ summary: >- 需要注意的是,这段文字中的一些链接和代码可能已经过时或者不适用于所有场景,建议在实际操作时参考最新的官方 date: 2025-08-10 08:25:39 --- + +{% note warning %} +注意:本文为早期 Hexo / Butterfly 魔改记录,本站现已迁移到 Astro,相关代码、路径或插件可能已经失效,仅作历史参考。 +{% endnote %} + 又开始折腾啦,这次把说说页面加上,改用moments项目的api {% link Moments 极简朋友圈,githun@kingwrcy,https://github.com/kingwrcy/moments %} diff --git a/src/content/posts/2025/2025.08/use-github-to-deploy-on-server.md b/src/content/posts/2025/2025.08/use-github-to-deploy-on-server.md index 91486b8..e9379f5 100644 --- a/src/content/posts/2025/2025.08/use-github-to-deploy-on-server.md +++ b/src/content/posts/2025/2025.08/use-github-to-deploy-on-server.md @@ -11,6 +11,10 @@ summary: >- date: 2025-08-18 17:10:18 --- +{% note warning %} +注意:本文为早期 Hexo / Butterfly 魔改记录,本站现已迁移到 Astro,相关代码、路径或插件可能已经失效,仅作历史参考。 +{% endnote %} + 1panel没有宝塔的webhook功能,之前一直使用在服务器上建立裸仓库,直接推送到服务器的方法。现在找到一种新的方法。 # 建立GitHub仓库 因为服务器部署在香港,可以直连GitHub,国内可以使用gitee或者GitHub镜像加速。 diff --git a/src/content/posts/2026/2026.2/add-float-menu.md b/src/content/posts/2026/2026.2/add-float-menu.md index 1dd4c5e..6ecf775 100644 --- a/src/content/posts/2026/2026.2/add-float-menu.md +++ b/src/content/posts/2026/2026.2/add-float-menu.md @@ -11,6 +11,10 @@ summary: >- date: 2026-02-10 07:11:14 --- +{% note warning %} +注意:本文为早期 Hexo / Butterfly 魔改记录,本站现已迁移到 Astro,相关代码、路径或插件可能已经失效,仅作历史参考。 +{% endnote %} + 看到柳神的网站有这种菜单,但是没有写魔改教程,只好自己慢慢摸索了。 {% link liushen,liushen,https://blog.liushen.fun %} diff --git a/src/content/posts/2026/2026.2/add-typesense-search.md b/src/content/posts/2026/2026.2/add-typesense-search.md index 4d1a829..7836d37 100644 --- a/src/content/posts/2026/2026.2/add-typesense-search.md +++ b/src/content/posts/2026/2026.2/add-typesense-search.md @@ -11,6 +11,10 @@ series: webcustom tags: --- +{% note warning %} +注意:本文为早期 Hexo / Butterfly 魔改记录,本站现已迁移到 Astro,相关代码、路径或插件可能已经失效,仅作历史参考。 +{% endnote %} + 最近在构建班级博客,用```ghost cms```,在构建搜索时发现了typesense,所以把他移植到这个博客上。 # 安装typesense diff --git a/src/pages/posts/[slug].astro b/src/pages/posts/[slug].astro index d87c076..1e5ac48 100644 --- a/src/pages/posts/[slug].astro +++ b/src/pages/posts/[slug].astro @@ -18,6 +18,9 @@ const { post } = Astro.props; const { Content } = await render(post.entry); const allPosts = await getAllPosts(); const rawContent = post.body; +const staleThreshold = new Date(); +staleThreshold.setFullYear(staleThreshold.getFullYear() - 1); +const isOutdatedPost = post.date < staleThreshold; const textContent = rawContent .replace(/```[\s\S]*?```/g, '') .replace(/<[^>]+>/g, '') @@ -121,6 +124,19 @@ const relatedPosts = allPosts )} +
@@ -131,6 +147,19 @@ const relatedPosts = allPosts + +