From e021c4fba83233755ce3217a20a561282c3301fe Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Wed, 8 Jul 2026 10:02:47 +0800 Subject: [PATCH] chore: update blog content and config --- _config.butterfly.yml | 26 +++++--- _config.yml | 127 +++++++++++++++++++++++++++---------- _config.yml.bak.2026-07-08 | 104 ++++++++++++++++++++++++++++++ package-lock.json | 10 +++ package.json | 3 +- source/about/index.md | 6 ++ source/categories/index.md | 6 ++ source/css/custom.css | 11 ++++ source/tags/index.md | 6 ++ 9 files changed, 255 insertions(+), 44 deletions(-) create mode 100644 _config.yml.bak.2026-07-08 create mode 100644 source/about/index.md create mode 100644 source/categories/index.md create mode 100644 source/tags/index.md diff --git a/_config.butterfly.yml b/_config.butterfly.yml index a0b308d..3275519 100644 --- a/_config.butterfly.yml +++ b/_config.butterfly.yml @@ -8,12 +8,13 @@ nav: logo: # Logo 图片 URL (留空则显示站点标题) display_title: true # 是否显示站点标题 - menu: - 首页: / || fas fa-home - 归档: /archives/ || fas fa-archive - 分类: /categories/ || fas fa-folder-open - 标签: /tags/ || fas fa-tags - 关于: /about/ || fas fa-heart + +menu: + 首页: / || fas fa-home + 归档: /archives/ || fas fa-archive + 分类: /categories/ || fas fa-folder-open + 标签: /tags/ || fas fa-tags + 关于: /about/ || fas fa-heart # ==================== 首页封面 ==================== # 封面大图 / 横幅设置 @@ -64,8 +65,17 @@ post: copyright: true # 文章末尾显示版权信息 # ==================== 搜索 ==================== -local_search: - enable: true # 开启本地搜索(无需第三方服务) +search: + use: local_search + placeholder: 搜索文章 + local_search: + preload: false + top_n_per_article: 1 + unescape: false + pagination: + enable: false + hitsPerPage: 8 + # ==================== 评论 ==================== comments: diff --git a/_config.yml b/_config.yml index 0c176e4..98b52d0 100644 --- a/_config.yml +++ b/_config.yml @@ -1,104 +1,161 @@ -# Hexo Configuration -## Docs: https://hexo.io/docs/configuration.html -## Source: https://github.com/hexojs/hexo/ +# ============================================================ +# Hexo 全局配置文件 +# 官方文档: https://hexo.io/docs/configuration.html +# 源码参考: https://github.com/hexojs/hexo/ +# ============================================================ -# Site +# ==================== 站点基本信息 ==================== +# 网站标题 title: 62117684535a5ba2 +# 网站副标题 subtitle: '' +# 网站描述 description: 4e004e2a7528 Hexo 642d5efa7684535a5ba2 +# 网站关键词,多个关键词可用逗号分隔或写成数组 keywords: +# 作者名称 author: wa feng +# 网站语言 language: zh-CN +# 时区,留空时通常使用系统默认时区 timezone: '' -# URL -## Set your site url here. For example, if you use GitHub Page, set url as 'https://username.github.io/project' +# ==================== 网站链接与文章链接格式 ==================== +# 网站主地址,例如 https://example.com url: https://blog.987119.xyz +# 文章永久链接格式 permalink: :year/:month/:day/:title/ +# 永久链接的默认变量,可按需补充 permalink_defaults: +# 伪静态链接设置 pretty_urls: - trailing_index: true # Set to false to remove trailing 'index.html' from permalinks - trailing_html: true # Set to false to remove trailing '.html' from permalinks + # 设为 false 可移除链接结尾的 index.html + trailing_index: true + # 设为 false 可移除链接结尾的 .html + trailing_html: true -# Directory +# ==================== 目录结构 ==================== +# 源文件目录 source_dir: source +# 生成后的静态文件目录 public_dir: public +# 标签页目录 tag_dir: tags +# 归档页目录 archive_dir: archives +# 分类页目录 category_dir: categories +# 代码下载目录 code_dir: downloads/code +# 多语言目录 i18n_dir: :lang +# 跳过渲染的文件或目录,可写通配规则 skip_render: -# Writing -new_post_name: :title.md # File name of new posts +# ==================== 写作与渲染设置 ==================== +# 新文章默认文件名格式 +new_post_name: :title.md # 新文章文件名格式 +# 新文章默认布局 default_layout: post -titlecase: false # Transform title into titlecase +# 是否把标题自动转成 Title Case +titlecase: false # 是否自动转换标题大小写 +# 外部链接处理设置 external_link: - enable: true # Open external links in new tab - field: site # Apply to the whole site + # 是否让外链默认在新标签页打开 + enable: true # 外链在新标签页打开 + # 生效范围:site 表示全站,post 表示仅文章 + field: site # 应用于全站 + # 排除的域名或链接 exclude: '' +# 文件名大小写策略 +# 0: 不修改,1: 转小写,2: 转大写 filename_case: 0 +# 是否渲染草稿文章 render_drafts: false +# 是否为每篇文章创建同名资源文件夹 post_asset_folder: false +# 是否使用相对链接 relative_link: false +# 是否发布未来日期的文章 future: true +# 代码高亮引擎,可选 highlight.js 或 prismjs syntax_highlighter: highlight.js + +# highlight.js 配置 highlight: + # 是否显示行号 line_number: true + # 是否自动检测语言 auto_detect: false + # Tab 替换内容 tab_replace: '' + # 是否自动包裹代码块 wrap: true + # 是否使用 hljs 样式类 hljs: false + +# PrismJS 配置 prismjs: + # 是否在渲染前预处理 preprocess: true + # 是否显示行号 line_number: true + # Tab 替换内容 tab_replace: '' -# Home page setting -# path: Root path for your blogs index page. (default = '') -# per_page: Posts displayed per page. (0 = disable pagination) -# order_by: Posts order. (Order by date descending by default) +# ==================== 首页设置 ==================== +# path: 博客首页路径,默认空字符串表示根路径 +# per_page: 每页显示文章数,0 表示关闭分页 +# order_by: 排序方式,默认按日期倒序 index_generator: path: '' per_page: 10 order_by: -date -# Category & Tag +# ==================== 分类与标签 ==================== +# 文章默认分类 default_category: uncategorized +# 分类映射,可把旧分类名映射到新分类名 category_map: +# 标签映射,可把旧标签名映射到新标签名 tag_map: -# Metadata elements -## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta +# ==================== HTML 元数据 ==================== +# 是否自动生成 meta generator 标签 meta_generator: true -# Date / Time format -## Hexo uses Moment.js to parse and display date -## You can customize the date format as defined in -## http://momentjs.com/docs/#/displaying/format/ +# ==================== 日期与时间格式 ==================== +# Hexo 使用 Moment.js 处理日期显示 +# 日期格式参考: http://momentjs.com/docs/#/displaying/format/ +# 文章日期显示格式 date_format: YYYY-MM-DD +# 时间显示格式 time_format: HH:mm:ss -## updated_option supports 'mtime', 'date', 'empty' +# 更新时间取值方式:mtime / date / empty updated_option: 'mtime' -# Pagination -## Set per_page to 0 to disable pagination +# ==================== 分页设置 ==================== +# 每页显示的文章数,设为 0 可关闭分页 per_page: 10 +# 分页目录名称 pagination_dir: page -# Include / Exclude file(s) -## include:/exclude: options only apply to the 'source/' folder +# ==================== 文件包含/排除规则 ==================== +# include / exclude / ignore 仅对 source/ 目录生效 +# 强制包含的文件 include: +# 排除处理的文件 exclude: +# 忽略监听或处理的文件 ignore: -# Extensions -## Plugins: https://hexo.io/plugins/ -## Themes: https://hexo.io/themes/ +# ==================== 扩展配置 ==================== +# 当前主题名称 theme: butterfly -# Deployment -## Docs: https://hexo.io/docs/one-command-deployment +# ==================== 部署配置 ==================== +# 一键部署配置,需配合对应部署插件使用 +# 文档: https://hexo.io/docs/one-command-deployment deploy: + # 部署方式,例如 git、sftp、rsync 等 type: '' diff --git a/_config.yml.bak.2026-07-08 b/_config.yml.bak.2026-07-08 new file mode 100644 index 0000000..0c176e4 --- /dev/null +++ b/_config.yml.bak.2026-07-08 @@ -0,0 +1,104 @@ +# Hexo Configuration +## Docs: https://hexo.io/docs/configuration.html +## Source: https://github.com/hexojs/hexo/ + +# Site +title: 62117684535a5ba2 +subtitle: '' +description: 4e004e2a7528 Hexo 642d5efa7684535a5ba2 +keywords: +author: wa feng +language: zh-CN +timezone: '' + +# URL +## Set your site url here. For example, if you use GitHub Page, set url as 'https://username.github.io/project' +url: https://blog.987119.xyz +permalink: :year/:month/:day/:title/ +permalink_defaults: +pretty_urls: + trailing_index: true # Set to false to remove trailing 'index.html' from permalinks + trailing_html: true # Set to false to remove trailing '.html' from permalinks + +# Directory +source_dir: source +public_dir: public +tag_dir: tags +archive_dir: archives +category_dir: categories +code_dir: downloads/code +i18n_dir: :lang +skip_render: + +# Writing +new_post_name: :title.md # File name of new posts +default_layout: post +titlecase: false # Transform title into titlecase +external_link: + enable: true # Open external links in new tab + field: site # Apply to the whole site + exclude: '' +filename_case: 0 +render_drafts: false +post_asset_folder: false +relative_link: false +future: true +syntax_highlighter: highlight.js +highlight: + line_number: true + auto_detect: false + tab_replace: '' + wrap: true + hljs: false +prismjs: + preprocess: true + line_number: true + tab_replace: '' + +# Home page setting +# path: Root path for your blogs index page. (default = '') +# per_page: Posts displayed per page. (0 = disable pagination) +# order_by: Posts order. (Order by date descending by default) +index_generator: + path: '' + per_page: 10 + order_by: -date + +# Category & Tag +default_category: uncategorized +category_map: +tag_map: + +# Metadata elements +## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta +meta_generator: true + +# Date / Time format +## Hexo uses Moment.js to parse and display date +## You can customize the date format as defined in +## http://momentjs.com/docs/#/displaying/format/ +date_format: YYYY-MM-DD +time_format: HH:mm:ss +## updated_option supports 'mtime', 'date', 'empty' +updated_option: 'mtime' + +# Pagination +## Set per_page to 0 to disable pagination +per_page: 10 +pagination_dir: page + +# Include / Exclude file(s) +## include:/exclude: options only apply to the 'source/' folder +include: +exclude: +ignore: + +# Extensions +## Plugins: https://hexo.io/plugins/ +## Themes: https://hexo.io/themes/ +theme: butterfly + +# Deployment +## Docs: https://hexo.io/docs/one-command-deployment +deploy: + type: '' diff --git a/package-lock.json b/package-lock.json index dbe8837..ad2be4b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,6 +12,7 @@ "hexo-generator-archive": "^2.0.0", "hexo-generator-category": "^2.0.0", "hexo-generator-index": "^4.0.0", + "hexo-generator-searchdb": "^1.5.0", "hexo-generator-tag": "^2.0.0", "hexo-renderer-ejs": "^2.0.0", "hexo-renderer-marked": "^7.0.0", @@ -1397,6 +1398,15 @@ "node": ">=18" } }, + "node_modules/hexo-generator-searchdb": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/hexo-generator-searchdb/-/hexo-generator-searchdb-1.5.0.tgz", + "integrity": "sha512-d0b5SueDxJimTFaHpPg430FQFx7DtMkmEIHo0UTOjXWRy+eDqNSp1CuS04P7fWzMnH2h+aQc6O9D2yY+3sdAUg==", + "license": "MIT", + "dependencies": { + "nunjucks": "^3.2.2" + } + }, "node_modules/hexo-generator-tag": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/hexo-generator-tag/-/hexo-generator-tag-2.0.0.tgz", diff --git a/package.json b/package.json index 1a15183..97e45f8 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "hexo-generator-archive": "^2.0.0", "hexo-generator-category": "^2.0.0", "hexo-generator-index": "^4.0.0", + "hexo-generator-searchdb": "^1.5.0", "hexo-generator-tag": "^2.0.0", "hexo-renderer-ejs": "^2.0.0", "hexo-renderer-marked": "^7.0.0", @@ -25,4 +26,4 @@ "hexo-theme-butterfly": "^5.5.5", "hexo-theme-landscape": "^1.0.0" } -} \ No newline at end of file +} diff --git a/source/about/index.md b/source/about/index.md new file mode 100644 index 0000000..054a958 --- /dev/null +++ b/source/about/index.md @@ -0,0 +1,6 @@ +--- +title: 关于 +date: 2026-07-08 00:00:00 +layout: about +--- +这是关于页面。 diff --git a/source/categories/index.md b/source/categories/index.md new file mode 100644 index 0000000..14dff17 --- /dev/null +++ b/source/categories/index.md @@ -0,0 +1,6 @@ +--- +title: 分类 +date: 2026-07-08 00:00:00 +type: categories +layout: categories +--- diff --git a/source/css/custom.css b/source/css/custom.css index b6d4d62..f9e58b0 100644 --- a/source/css/custom.css +++ b/source/css/custom.css @@ -145,3 +145,14 @@ html:not([data-theme="dark"]) #post-info #post-meta i { margin-bottom: 10px; } } + +/* ==================== 文章标题栏字号放大 30% ==================== */ +#post-info .post-title { + font-size: 3.25em !important; +} + +@media screen and (max-width: 768px) { + #post-info .post-title { + font-size: 2.73em !important; + } +} diff --git a/source/tags/index.md b/source/tags/index.md new file mode 100644 index 0000000..4cd09e5 --- /dev/null +++ b/source/tags/index.md @@ -0,0 +1,6 @@ +--- +title: 标签 +date: 2026-07-08 00:00:00 +type: tags +layout: tags +---