Releases: D-Sketon/hexo-theme-reimu
v1.5.1
修复
- 修正 ja 多语言翻译错误
- 修复多语言模式下 footer 错误缓存的 bug
- 修复和优化样式,提升文字对比度,优化阴影效果
特性
- 新增
injector
配置用于注入自定义代码,其效果和 Hexo#Injector 类似,支持head
、body
和sidebar
注入injector: head_begin: # Inject code snippet right after <head> head_end: # Inject code snippet right before </head> body_begin: # Inject code snippet right after <body> body_end: # Inject code snippet right before </body> sidebar_begin: # Inject code snippet right after <aside> sidebar_end: # Inject code snippet right before </aside>
Fixes
- Fixed incorrect Japanese multilingual translation errors.
- Resolved footer caching bugs under multilingual mode.
- Optimized styles: Improved text contrast and enhanced shadow effects.
Features
- Added
injector
configuration to inject custom code snippets, with functionality similar to Hexo#Injector. It supports injection intohead
,body
, andsidebar
areas:injector: head_begin: # Inject code snippet right after <head> head_end: # Inject code snippet right before </head> body_begin: # Inject code snippet right after <body> body_end: # Inject code snippet right before </body> sidebar_begin: # Inject code snippet right after <aside> sidebar_end: # Inject code snippet right before </aside>
New Contributors
- @reindex-ot made their first contribution in #91
Full Changelog: v1.5.0...v1.5.1
v1.5.0
Tip
多语言使用相关详情请见 如何为Hexo添加多语言支持
修复
- 修复了
language
为en
时菜单跳转链接异常的 bug - 修复了首页/归档/分类/标签/最近文章等页面不能正确显示多语言文章的标题和摘要的 bug
- 修复了文章版权声明在多语言模式下文章链接显示错误的 bug
- 修复了 pjax 下多语言切换时页面语言不更新的 bug
特性
- 文章版权现在支持多语言了
重构
- 发布了
@reimujs/hexo-algoliasearch
插件,用于支持多语言文章的搜索,其使用方式和hexo-algoliasearch
完全一致 - 内置了
hexo-generator-search
插件用于支持多语言文章的搜索,所以无需再安装hexo-generator-search
,其配置方式和hexo-generator-search
基本一致:generator_search: enable: true # true | false field: post content: true
Tip
For more information about multiple languages(i18n), please refer to How to add multi-language support to Hexo
Fixes
- Fixed a bug where menu jump links were abnormal when
language
was set toen
. - Fixed a bug where the homepage/archive/category/tag/recent posts pages could not correctly display titles and summaries of multilingual articles.
- Fixed a bug where the article copyright statement displayed incorrect article links in multilingual mode.
- Fixed a bug where the page language would not update when switching languages under pjax.
Features
- Article copyright now supports multiple languages.
Refactor
- Released the
@reimujs/hexo-algoliasearch
plugin to support searching for multilingual articles. Its usage is identical tohexo-algoliasearch
. - Built-in
hexo-generator-search
plugin to support searching for multilingual articles, so there's no need to installhexo-generator-search
separately. Its configuration is mostly the same ashexo-generator-search
:generator_search: enable: true # true | false field: post content: true
Full Changelog: v1.4.0...v1.5.0
v1.4.0
修复
- 修复了
<video></video>
标签不可见的 bug
特性
-
Aplayer 新增了
lrcType
配置用于控制歌词类型 -
dark_mode
新增了auto
模式,根据用户系统设置自动切换,且现在默认为auto
模式dark_mode: enable: auto # true | false | auto
-
实验性地引入了
hexo-generator-i18n
并提供了多语言切换功能,可以在内层_config.yml
中配置i18n
来添加自定义语言,其配置方式可参考 hexo-generator-i18n:i18n: enable: false # false | true type: [page, post] generator: [archive, category, tag, index] languages: [zh-CN, en] # 语言列表,第一个为默认语言
对于 post 的多语言支持,可以在 Front-matter 中添加
lang
来指定除默认语言外的其他语言(默认语言不需要添加)lang: en
以上会生成
/en/:permalink
的页面对于 page 的多语言支持,可直接在
source
文件夹下新建对应语言的文件夹,并将index.md
放入其中,如source/en/about/index.md
。这会生成/en/about
的页面 -
新增了类似 vitepress 的自定义容器功能,使用前需要安装最新的(v1.2.0+) @reimujs/hexo-renderer-markdown-it-plus,并在内层
_config.yml
中将markdown.container
改为true
markdown: container: true
使用方法如下:
::: info This is an info box. ::: ::: tip This is a tip. ::: ::: warning This is a warning. ::: ::: danger This is a dangerous warning. ::: ::: danger 自定义标题 Danger zone, do not proceed ::: ::: details This is a details block. :::
Fixes
- Fixed a bug where the
<video></video>
tag was not visible.
Features
-
Added
lrcType
configuration to Aplayer for controlling lyric types. -
Introduced
auto
mode fordark_mode
, which automatically switches based on the user's system settings. The default mode is nowauto
.dark_mode: enable: auto # true | false | auto
-
Experimental integration of
hexo-generator-i18n
with multilingual switching support. You can configurei18n
in the inner_config.yml
to add custom languages. Refer to hexo-generator-i18n for configuration details:i18n: enable: false # false | true type: [page, post] generator: [archive, category, tag, index] languages: [zh-CN, en] # List of languages, the first one is the default language
For multilingual support in posts, add
lang
in the Front-matter to specify languages other than the default language (the default language does not need to be added).lang: en
This will generate a page at
/en/:permalink
.For multilingual support in pages, create a folder for the corresponding language in the
source
directory and place anindex.md
file inside it, such assource/en/about/index.md
. This will generate a page at/en/about
. -
Added a custom container feature similar to vitepress. Before using it, install latest(v1.2.0+) @reimujs/hexo-renderer-markdown-it-plus and set
markdown.container
totrue
in the inner_config.yml
.markdown: container: true
Usage is as follows:
::: info This is an info box. ::: ::: tip This is a tip. ::: ::: warning This is a warning. ::: ::: danger This is a dangerous warning. ::: ::: danger Custom Title Danger zone, do not proceed. ::: ::: details This is a details block. :::
Full Changelog: v1.3.2...v1.4.0
v1.3.2
修复
- 修复了
KaTeX
客户端渲染在 PJAX 模式下Waline
等评论报错的 bug - 修复了
Valine
、Gitalk
和Twikoo
评论系统在 PJAX 模式下抛出异常的 bug - 优化了
Waline
和Gitalk
评论系统的样式 - 优化了 sticky Tag 的样式
- 优化了 PJAX 模式下 script 标签的执行逻辑
特性
- vendor 现在支持使用链接,现在以下配置均合法
vendor: js: katex: webcache|[email protected]/dist/katex.min.css # 使用指定 CDN katex: https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css # 使用链接 katex: /vendor/katex.min.css # 使用本地文件
Fixes
- Fixed a bug where KaTeX client-side rendering caused errors with Waline and other comments in PJAX mode.
- Fixed bugs where Valine, Gitalk, and Twikoo comment systems threw exceptions in PJAX mode.
- Optimized the styles for the Waline and Gitalk comment systems.
- Optimized the styles for the sticky tag.
- Optimized the script tag execution logic in PJAX mode.
Features
- Vendor now supports using links, and the following configurations are valid:
vendor: js: katex: webcache|[email protected]/dist/katex.min.css # Use a specified CDN katex: https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css # Use an absolute URL katex: /vendor/katex.min.css # Use a local file
Full Changelog: v1.3.1...v1.3.2
v1.3.1
修复
- 修复了代码块存在横向滚动条时行号和代码块不对齐的 bug
- 修复了侧边栏溢出时无法滚动的 bug
特性
- 添加了
theme_version_check
配置用于检查主题版本,当主题版本过低时会在控制台输出警告theme_version_check: true # true | false
- 添加了
theme_config_check
配置用于检查主题配置,当主题配置存在冲突时会在控制台输出警告theme_config_check: true # true | false
- 渐进支持了
interpolate-size
,现在 Chrome 129+ 的代码块折叠和 TOC 锚点会有动画效果
杂项
- 升级了 mouse-firework 依赖,减少内存占用
Fixes
- Fixed bug where line numbers and code blocks were misaligned when horizontal scrollbars were present.
- Fixed bug where sidebar couldn't scroll when overflowing.
Features
- Added
theme_version_check
configuration to check the theme version. A warning will be displayed in the console when the theme version is outdated.theme_version_check: true # true | false
- Added
theme_config_check
configuration to check for theme configuration conflicts. A warning will be displayed in the console if there are any conflicts.theme_config_check: true # true | false
- Progressive support for
interpolate-size
, now code block collapsing and TOC anchor points will have animation effects in Chrome 129+.
Miscs
- Upgraded the
mouse-firework
dependency to reduce memory usage.
Full Changelog: v1.3.0...v1.3.1
v1.3.0
修复
- 修复了自定义封面时 pjax 失效的 bug
- 修复了点击侧边栏按钮进行跳转时 pjax 失效的 bug
- 修复了当标题以数字开头时 TOC 无法正常显示的 bug
- 修正样式
特性
- 新增了
share
配置用于开启分享功能,目前支持facebook
、twitter
、linkedin
、reddit
、weibo
、qq
、weixin
。share: - facebook - twitter - linkedin - reddit - weibo - qq - weixin
weixin
状态下会生成带有二维码的分享卡片,可保存到本地后分享到微信朋友圈(注意,当文章封面存在跨域问题时无法使用 html-to-image 正确生成含图片的卡片!) - 支持在文章
front-matter
中配置sidebar
字段,用于控制文章是否显示侧边栏,优先级高于全局配置--- sidebar: left # left | right | false ---
reimu_cursor
配置结构发生变化,新增cursor
配置用于自定义鼠标路径。(仍然兼容老配置)reimu_cursor: enable: true cursor: default: ../images/cursor/reimu-cursor-default.png pointer: ../images/cursor/reimu-cursor-pointer.png text: ../images/cursor/reimu-cursor-text.png
Fixes
- Fixed bug where PJAX failed when using a custom cover.
- Fixed bug where PJAX failed when clicking sidebar buttons for navigation.
- Fixed bug where TOC didn't display correctly when the title started with a number.
- Fixed styles.
Features
-
Added
share
configuration to enable sharing functionality. Currently supportsfacebook
,twitter
,linkedin
,reddit
,weibo
,qq
, andweixin
.share: - facebook - twitter - linkedin - reddit - weibo - qq - weixin
When
weixin
is enabled, a share card with a QR code will be generated, which can be saved locally and shared to WeChat Moments. (Note: If the article cover has cross-origin issues, the HTML-to-image process might fail to generate the card with an image!) -
Added support for
sidebar
field in articlefront-matter
to control whether the sidebar is displayed for that article. This overrides global configuration.--- sidebar: left # left | right | false ---
-
The
reimu_cursor
configuration structure has changed. A newcursor
field allows for custom mouse paths. (Old configuration is still supported.)reimu_cursor: enable: true cursor: default: ../images/cursor/reimu-cursor-default.png pointer: ../images/cursor/reimu-cursor-pointer.png text: ../images/cursor/reimu-cursor-text.png
Full Changelog: v1.2.0...v1.3.0
V1.2.0
修复
- 修复
home_categories
只能填写一个以上分类的 bug
特性
-
新增了
live2d_widgets
配置用于开启/关闭 live2d-widgetslive2d_widgets: enable: true # true | false position: left # left | right
-
为
top
和live2d
新增position
配置,用于控制其位置top: enable: true # true | false position: right # left | right live2d: enable: true # true | false position: left # left | right
-
新增
player
配置用于配置 Aplayer / Meting 音乐播放器,使用前建议打开 pjaxplayer: aplayer: enable: false options: audio: [] fixed: autoplay: loop: order: preload: volume: mutex: listFolded: meting: enable: false meting_api: # custom api options: id: server: type: auto:
Fixes
- Fixed bug where
home_categories
could only contain one category.
Features
-
Added
live2d_widgets
configuration to enable/disable live2d-widgets.live2d_widgets: enable: true # true | false position: left # left | right
-
Added
position
configuration fortop
andlive2d
to control their position.top: enable: true # true | false position: right # left | right live2d: enable: true # true | false position: left # left | right
-
Added
player
configuration to configure Aplayer / Meting music players. It is recommended to enable PJAX before using.player: aplayer: enable: false options: audio: [] fixed: autoplay: loop: order: preload: volume: mutex: listFolded: meting: enable: false meting_api: # custom api options: id: server: type: auto:
Full Changelog: v1.1.1...v1.2.0
v1.1.1
修复
- 修复了客户端渲染下 KaTeX 内链公式无法显示的 bug
特性/优化
现在数学公式不论客户端渲染还是服务端渲染均需安装 @reimujs/hexo-renderer-markdown-it-plus
不论 KaTeX 还是 MathJax3 的客户端渲染,都强烈建议在外层 _config.yml
中添加如下配置
markdown_it_plus:
rawLaTeX: true # for client render
这样便无需添加 raw 标签即可直接使用原生 LaTeX 多行块公式
Fixes
- Fixed bug where inline KaTeX formulas were not displaying correctly in client-side rendering.
Features/Optimizations
Now, for both client-side and server-side rendering of mathematical formulas, you need to install @reimujs/hexo-renderer-markdown-it-plus.
For both KaTeX and MathJax3 client-side rendering, it is strongly recommended to add the following configuration in the outer _config.yml
:
markdown_it_plus:
rawLaTeX: true # for client render
With this configuration, you can use native LaTeX block formulas without needing to add the raw
tag.
Full Changelog: v1.1.0...v1.1.1
v1.1.0
修复
- 修复了部分 css token 未统一的问题
特性
- 添加了配置用于控制代码块的默认展开状态,
expand
可以设置为true
、false
或数字,数字表示当代码块的行数大于该数字时默认收缩。code_block: expand: true # true | false | number
- 添加了
local_font
配置用于定义本机兜底字体,其优先级比谷歌字体低:local_font: article: - "-apple-system" - PingFang SC - Microsoft YaHei - sans-serif code: - Menlo - Monaco - Consolas - monospace
杂项
- 为 README 添加了“自定义主题”和“内置卡片Tag”板块
Fixes
- Fixed the issue where some CSS tokens were not unified.
Features
-
Added configuration to control the default expand state of code blocks. The
expand
option can be set totrue
,false
, or a number. If a number is provided, the code block will collapse by default if the number of lines exceeds that value.code_block: expand: true # true | false | number
-
Added
local_font
configuration to define fallback fonts, with a lower priority than Google Fonts:local_font: article: - "-apple-system" - PingFang SC - Microsoft YaHei - sans-serif code: - Menlo - Monaco - Consolas - monospace
Miscs
- Added sections on "Custom Themes" and "Built-in Card Tags" to the README.
Full Changelog: v1.0.0...v1.1.0
v1.0.0
Warning
包含破坏性变更,升级前请仔细阅读版本日志
修复
- 修复了
KaTeX
带有 tag 时会有多余的滚动条的 bug - 修复了
KaTeX
带有 tag 且宽度过小时会和左侧公式重叠的 bug - 修复了
giscus
评论不会随着日夜模式切换而改变主题的 bug,现在giscus
的commentTheme
配置无效giscus: commentTheme: # 无效的配置,现在主题由 reimu 托管了
- 修复了
postLinkCard
Tag 未对excerpt
进行转义的 bug - 修复了 Github icon 在夜间模式下颜色不明显的问题
- 同步了部分 transition 动画,使得动画更加统一
特性
- 现在
KaTeX
服务端渲染建议使用@reimujs/hexo-renderer-markdown-it-plus
插件,以支持最新的KaTeX
- 现在数学公式的配置结构发生了变化(与老配置不兼容)同时支持了
MathJax3
和KaTeX
,且KaTeX
还支持了客户端渲染(不需要再安装 hexo 插件,但是会增加页面加载时间)math: enable: false katex: enable: false # KaTeX autoRender: false # true 代表客户端渲染,false 代表服务端渲染,需要安装 `@reimujs/hexo-renderer-markdown-it-plus` 插件 mathjax: enable: false # MathJax3,客户端渲染,无需安装插件 options: # MathJax3 配置 { tex: { tags: "ams", useLabelIds: true, inlineMath: [["$", "$"], ['\\(', '\\)']], displayMath: [["$$", "$$"], ['\\[', '\\]']], processEscapes: true, processEnvironments: true, autoload: { color: [], colorv2: ["color"] }, packages: { "[+]": ["noerrors"] }, }, options: { skipHtmlTags: ["script", "noscript", "style", "textarea", "pre", "code"], ignoreHtmlClass: "tex2jax_ignore", processHtmlClass: "tex2jax_process", }, loader: { load: ["input/asciimath", "[tex]/noerrors"] }, }
- 现在支持在首页展示分类卡片,用来代替 widget 的
categories
,默认关闭home_categories: enable: false # true | false content: - categories: # 目录名称,格式和 front-matter 中的 categories 一致,可以为字符串(单级分类)或数组(多级分类) cover: # 卡片封面,不填则使用随机封面
性能
- CSS 持续性 tree-shaking,现在
social
中只有用到的图标会被打包 - CSS 持续性 tree-shaking,现在
KaTeX
的样式是按需打包的
重构
- 现在搜索和移动端侧边栏共用一个 mask,减少了代码量
- 统一了 css 中的 token 颜色,现在可以通过修改某些 token 实现替换主题色
- 重构了
menu
配置,现在支持自定义 iconmenu: - name: home url: / icon: # 不填默认使用太极图标 - name: archives url: /archives icon: f0c1 # 你可以填写一个十六进制的数字来自定义 icon,支持 fontawesome 和 icon font - name: about url: /about icon: - name: friend url: /friend icon:
- 重构了
footer
、top
、sponsor
配置,现在支持自定义 iconfooter: icon: url: "../images/taichi.png" # 相对于 css/style.css 的路径,所以需要向上一级才能找到 images 文件夹 rotate: true mask: true top: # 这是新增配置 enable: true # true | false icon: url: "../images/taichi.png" rotate: true mask: true sponsor: icon: url: "../images/taichi.png" rotate: true mask: true
- 重构了
preloader
配置,现在支持自定义加载动画 iconpreloader: enable: true text: 少女祈祷中... icon: # 不填默认使用内链的svg(保证首屏加载速度),你可以填入一个链接来自定义加载图标,如 '/images/taichi.png'
- 新增了
anchor_icon
配置,现在支持自定义锚点 iconanchor_icon: # 不填默认使用 # 图标
Warning
Breaking changes included, please read the changelog carefully before upgrading.
Fixes
- Fixed bug where KaTeX with tags caused an extra scrollbar.
- Fixed bug where KaTeX with tags and small width caused overlap with the left-side formula.
- Fixed bug where the
giscus
comment theme wouldn't change with the day/night mode; thecommentTheme
configuration ingiscus
is now deprecated.giscus: commentTheme: # Deprecated, theme is now handled by reimu
- Fixed bug where the
postLinkCard
tag didn't escapeexcerpt
correctly. - Fixed issue where the GitHub icon color was not visible in night mode.
- Synced some transition animations to make them more unified.
Features
- Server-side KaTeX rendering now recommends using the
@reimujs/hexo-renderer-markdown-it-plus
plugin to support the latest KaTeX. - The math configuration structure has changed (not backward compatible). Both MathJax3 and KaTeX are supported, and KaTeX now also supports client-side rendering (no need to install hexo plugins, but may increase page load time).
math: enable: false katex: enable: false # KaTeX autoRender: false # true for client-side, false for server-side rendering (requires `@reimujs/hexo-renderer-markdown-it-plus` plugin) mathjax: enable: false # MathJax3, client-side rendering (no plugin required) options: # MathJax3 configuration { tex: { tags: "ams", useLabelIds: true, inlineMath: [["$", "$"], ['\\(', '\\)']], displayMath: [["$$", "$$"], ['\\[', '\\]']], processEscapes: true, processEnvironments: true, autoload: { color: [], colorv2: ["color"] }, packages: { "[+]": ["noerrors"] }, }, options: { skipHtmlTags: ["script", "noscript", "style", "textarea", "pre", "code"], ignoreHtmlClass: "tex2jax_ignore", processHtmlClass: "tex2jax_process", }, loader: { load: ["input/asciimath", "[tex]/noerrors"] }, }
- Added support to display category cards on the homepage, replacing the
categories
widget. Disabled by default.home_categories: enable: false # true | false content: - categories: # Category name, matches the format in front-matter categories (single-level or multi-level array) cover: # Card cover image, if not provided, a random one is used
Performance
- Ongoing CSS tree-shaking; now only used icons from
social
are bundled. - Ongoing CSS tree-shaking; now KaTeX styles are bundled on-demand.
Refactoring
- Search and mobile sidebar now share the same mask, reducing code.
- Unified token colors in CSS; now you can change theme colors by modifying specific tokens.
- Refactored
menu
configuration to support custom icons.menu: - name: home url: / icon: # Default icon is the Taichi symbol if not provided - name: archives url: /archives icon: f0c1 # Custom icon, supports hex code for fontawesome and icon fonts - name: about url: /about icon: - name: friend url: /friend icon:
- Refactored
footer
,top
, andsponsor
configurations to support custom icons.footer: icon: url: "../images/taichi.png" # Path relative to css/style.css rotate: true mask: true top: # New configuration enable: true # true | false icon: url: "../images/taichi.png" rotate: true mask: true sponsor: icon: url: "../images/taichi.png" rotate: true mask: true
- Refactored
preloader
configuration to support custom loading animation icons.preloader: enable: true text: Loading... icon: # Custom icon URL (defaults to embedded SVG for fast loading)
- Added
anchor_icon
configuration to allow customization of anchor icons.anchor_icon: # Default is "#" icon
Full Changelog: v0.3.5...v1.0.0