# ============================================================ # Hexo 全局配置文件 # 官方文档: https://hexo.io/docs/configuration.html # 源码参考: https://github.com/hexojs/hexo/ # ============================================================ # ==================== 站点基本信息 ==================== # 网站标题 title: 个人自留地 # 网站副标题 subtitle: '何年是歸日,雨淚下孤舟。' # 网站描述 description: 一个记录生活的博客 # 网站关键词,多个关键词可用逗号分隔或写成数组 keywords: 博客,知识库 # 作者名称 author: any # 网站语言 language: zh-CN # 时区,留空时通常使用系统默认时区 timezone: '' # ==================== 网站链接与文章链接格式 ==================== # 网站主地址,例如 https://example.com url: https://blog.987119.xyz # 文章永久链接格式 permalink: :year/:month/:day/:title/ # 永久链接的默认变量,可按需补充 permalink_defaults: # 伪静态链接设置 pretty_urls: # 设为 false 可移除链接结尾的 index.html trailing_index: true # 设为 false 可移除链接结尾的 .html trailing_html: true # ==================== 目录结构 ==================== # 源文件目录 source_dir: source # 生成后的静态文件目录 public_dir: public # 标签页目录 tag_dir: tags # 归档页目录 archive_dir: archives # 分类页目录 category_dir: categories # 代码下载目录 code_dir: downloads/code # 多语言目录 i18n_dir: :lang # 跳过渲染的文件或目录,可写通配规则 skip_render: # ==================== 写作与渲染设置 ==================== # 新文章默认文件名格式 new_post_name: :title.md # 新文章文件名格式 # 新文章默认布局 default_layout: post # 是否把标题自动转成 Title Case titlecase: false # 是否自动转换标题大小写 # 外部链接处理设置 external_link: # 是否让外链默认在新标签页打开 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: '' # ==================== 首页设置 ==================== # path: 博客首页路径,默认空字符串表示根路径 # per_page: 每页显示文章数,0 表示关闭分页 # order_by: 排序方式,默认按日期倒序 index_generator: path: '' per_page: 10 order_by: -date # ==================== 分类与标签 ==================== # 文章默认分类 default_category: uncategorized # 分类映射,可把旧分类名映射到新分类名 category_map: # 标签映射,可把旧标签名映射到新标签名 tag_map: # ==================== HTML 元数据 ==================== # 是否自动生成 meta generator 标签 meta_generator: true # ==================== 日期与时间格式 ==================== # Hexo 使用 Moment.js 处理日期显示 # 日期格式参考: http://momentjs.com/docs/#/displaying/format/ # 文章日期显示格式 date_format: YYYY-MM-DD # 时间显示格式 time_format: HH:mm:ss # 更新时间取值方式:mtime / date / empty updated_option: 'mtime' # ==================== 分页设置 ==================== # 每页显示的文章数,设为 0 可关闭分页 per_page: 10 # 分页目录名称 pagination_dir: page # ==================== 文件包含/排除规则 ==================== # include / exclude / ignore 仅对 source/ 目录生效 # 强制包含的文件 include: # 排除处理的文件 exclude: # 忽略监听或处理的文件 ignore: # ==================== 扩展配置 ==================== # 当前主题名称 theme: butterfly theme_config: menu: 首页: / || fas fa-home 归档: /archives/ || fas fa-archive 分类: /categories/ || fas fa-folder-open 标签: /tags/ || fas fa-tags 关于: /about/ || fas fa-heart index: banner: enable: true img: https://api.btstu.cn/sjbz/api.php theme_color: enable: true main: '#2D8CF0' paginator: '#2D8CF0' button_hover: '#EE2C50' card: enable: true display: spacious margin: 30px sidebar: enable: true position: right widgets: - type: recent_posts limit: 5 - type: tags limit: 10 footer: enable: true since: 2026 social: GitHub: https://github.com/ || fab fa-github post: meta: date: true updated: true categories: true copyright: true search: use: local_search placeholder: 搜索文章 local_search: preload: false top_n_per_article: 1 unescape: false pagination: enable: false hitsPerPage: 8 comments: use: "" inject: head: - - code_blocks: theme: pale night macStyle: true height_limit: 800 word_wrap: true copy: true language: true shrink: false fullpage: false disable_top_img: false default_top_img: transparent index_img: transparent archive_img: false tag_img: transparent tag_per_img: transparent category_img: transparent category_per_img: transparent footer_img: transparent background: https://image.987119.xyz/uploads/2026/07/18c0005c5dac2c14635.webp index_site_info_top: 200px index_top_img_height: 400px # ==================== 部署配置 ==================== # 一键部署配置,需配合对应部署插件使用 # 文档: https://hexo.io/docs/one-command-deployment deploy: # 部署方式,例如 git、sftp、rsync 等 type: ''