Releases: D-Sketon/hugo-theme-reimu
v0.13.2
修复
- 修复 valine/waline 评论计数器无法正确展示的问题
特性
- 渐进支持了
text-autospace
,现在 Chrome 140+ 的浏览器会自动在 CJK 和 EN 之间添加间距,无需手动配置 - 优化分享微信弹出卡片,现在点击分享图标以外的区域会自动关闭卡片
- 优化顶部 nav 菜单点击热区,现在点击 icon 也能触发菜单跳转
- Front-matter 中新增
author
字段用于标记文章作者 (用于分享卡片和文章版权),其优先级最高--- author: D-Sketon # 文章作者 ---
- 新增
triangle_badge
配置用于在右上角展示三角徽章,支持自定义链接和图标triangle_badge: enable: false # true | false icon: github # 与 social 配置里的 icon 相同 link:
杂项
- 更新 mermaid 至 v11.12.0
- 更新 quicklink 至 v3.0.1
- 更新 katex 至 v0.16.24
- 更新 snapdom 至 v1.9.14
- 更新 fontawesome 至 v7.1.0
Fixes
- Fixed the issue where Valine/Waline comment counters could not display correctly.
Features
- Gradually added support for
text-autospace
. Browsers with Chrome 140+ will now automatically add spacing between CJK and Latin characters, eliminating the need for manual configuration. - Optimized the WeChat share card popup. Clicking outside the share icon will now automatically close the card.
- Improved the clickable area of the top navigation menu. Clicking the icon will now also trigger menu navigation.
- Added an
author
field in the Front-matter to mark the article author (for share cards and article copyright), with the highest priority.--- author: D-Sketon # Article author ---
- Added a
triangle_badge
configuration to display a triangular badge in the upper right corner, supporting custom links and icons.triangle_badge: enable: false # true | false icon: github # Same as the icon in the social configuration link:
Miscellaneous
- Updated Mermaid to v11.12.0
- Updated Quicklink to v3.0.1
- Updated KaTeX to v0.16.24
- Updated Snapdom to v1.9.14
- Updated FontAwesome to v7.1.0
Full Changelog: v0.13.1...v0.13.2
v0.13.1
修复
- 修复当博客页面高度加载发生抖动时,底部 nav 无法正确展示的问题
特性
- 优化过期提示的样式,现在其样式和 WARNING 块引用一致
- Front-matter 中新增
outdated
字段用于标记文章过期,其优先级最高,且无视全局配置当该字段为--- outdated: true # true | false ---
true
时,文章顶部会显示过期提示
Fixes
- Fixed an issue where the bottom navigation bar was not displayed correctly when the page height flickered during loading.
Features
- Optimized the style of the outdated notice, which is now consistent with the WARNING blockquote style.
- Added an
outdated
field in the front-matter to mark an article as outdated. It has the highest priority and overrides the global configuration.When this field is--- outdated: true # true | false ---
true
, an outdated notice will be displayed at the top of the article.
Full Changelog: v0.13.0...v0.13.1
v0.13.0
修复
- 修复折叠代码块的复制按钮无法复制的问题
- 修复自动主题切换时 mermaid 首次展示主题不正确的问题
特性
- 新增 mermaid 的
zoom
配置,用于控制是否启用缩放,默认关闭mermaid: zoom: false # true | false
重构
- 重构样式以提升一致性与美观度
- 调整卡片、评论与容器的内外边距,优化留白
- 改进小部件与侧边栏样式,优化对齐与间距
- 统一圆角值,增强视觉一致性
- 优化友链、页脚与页眉的响应式布局
- 更新热力图样式,提升可读性与清晰度
- 规范按钮与通知样式,统一交互与状态
- 调整字体大小与行高,提升阅读体验
- 优化移动端与桌面端滚动条样式
- 优化代码块样式,提升可读性与一致性
- 为标题添加淡入模糊动画
- 优化移动端文章内边距,提升阅读体验
- 增强可访问性(a11y)
- 为布局、导航与交互控件补充 aria-label
- 为可能截断的内容补充 title 提示
- 优化搜索弹窗的可访问性与交互,完善键盘导航与关闭逻辑
性能
- 精简 HTML,本人博客总体积大约减少了 8%
- 移除链接不必要的 external 属性
- 外置 pjax 相关 js 逻辑
- 精简 after-footer 与 loader 逻辑
- 按需动态生成评论系统配置,减少无效代码输出
Fixes
- Fixed copy button in folded code blocks failing to copy content
- Fix incorrect theme display on first render of mermaid during automatic theme switching
Features
- Added
zoom
configuration for mermaid to control whether zoom is enabled, defaults to falsemermaid: zoom: false # true | false
Refactor
- Refactored styles to improve consistency and aesthetics
- Adjusted padding and margins for cards, comments, and containers to optimize whitespace
- Improved widget and sidebar styles for better alignment and spacing
- Unified border-radius values for enhanced visual consistency
- Optimized responsive layout for friend links, footer, and header
- Updated heatmap styles for better readability and clarity
- Standardized button and notification styles for consistent interaction and states
- Adjusted font sizes and line heights to improve reading experience
- Optimized scrollbar styles for mobile and desktop
- Enhanced code block styles for better readability and consistency
- Added fade-in blur animation for headings
- Optimized article padding on mobile for improved reading experience
- Enhanced accessibility (a11y)
- Added aria-labels for layout, navigation, and interactive controls
- Added title hints for potentially truncated content
- Improved accessibility and interaction of the search modal, enhancing keyboard navigation and close logic
Performance
- Streamlined HTML, reducing total blog size by approximately 8%
- Removed unnecessary external attributes from links
- Externalized pjax-related JavaScript logic
- Simplified after-footer and loader logic
- Dynamically generated comment system configurations on-demand to reduce invalid code output
Full Changelog: v0.12.2...v0.13.0
v0.12.2
修复
- 修复 v0.12.1 改变结构后 “开启播放器后移动端将强制展示 fixed 类型的播放器” 特性失效的问题
- RSS 中排除 shortcode 内容
特性
- 新增
summary
配置用于控制是否展示文章摘要,默认关闭。可选择subtitle
或blockquote
样式summary: enable: false # true | false style: 'subtitle' # 'subtitle' or 'blockquote'
性能
- CSS 持续性优化
Fixes
- Fixed the issue where the "when the player is enabled, the fixed type player will be forcibly displayed on the mobile end" feature in v0.12.1 was disabled
- Excluded shortcode content in RSS
Features
- Added
summary
configuration to control whether to display the article summary, disabled by default. Can choosesubtitle
orblockquote
stylesummary: enable: false # true | false style: 'subtitle' # 'subtitle' or 'blockquote'
Performance
- Continuous CSS optimization
Full Changelog: v0.12.1...v0.12.2
v0.12.1
修复
- 修复热力图未来日期的处理逻辑,确保只统计过去的文章数据
- 修复热力图日期标签重叠的问题
特性
- 新增
player.position
配置用于控制播放器的位置,可选择在 sidebar 之前、之后或 widget 之后,默认在 sidebar 之后player: position: before_sidebar # before_sidebar / after_sidebar / after_widget
- 新增
show_update_time
配置用于控制是否展示文章更新时间,默认关闭show_update_time: true # true | false
- 新增
moe_icp
配置用于控制是否展示萌 ICP 备案信息,默认关闭moe_icp: icpnumber: # 萌国ICP备案号
- 对于 Hugo v0.132.0 以下版本,新增
alertBlockquote
shortcode 用于展示块引用,支持多种类型{{< alertBlockquote type="?" >}} Your content here {{</alertBlockquote>}}
- type:块引用的类型,可选参数为:
note
、tip
、important
、warning
、danger
- type:块引用的类型,可选参数为:
- 对于 Hugo v0.132.0 及以上版本 支持使用 Hugo Blockquote render hooks 展示 Alert 块引用
> [!NOTE] > Useful information that users should know, even when skimming content.
- 多语言增加对葡萄牙语(巴西)的支持
- 使用 snapdom 替代 html2image 生成截图
杂项
- 更新 mermaid 至 v11.10.1
- 更新 qrcode 至 v1.5.1
- 更新 dompurify 至 v3.2.6
- 更新 fontawesome 至 v7.0.0
Fixes
- Fixed the issue where future dates were incorrectly processed in the heatmap, ensuring that only past article data is counted.
- Fixed the issue of overlapping date labels in the heatmap.
Features
- Added
player.position
configuration to control the player's position, which can be placed before the sidebar, after the sidebar, or after the widget. Defaults to after the sidebar.player: position: before_sidebar # before_sidebar / after_sidebar / after_widget
- Added
show_update_time
configuration to control whether to display the article update time. Disabled by default.show_update_time: true # true | false
- Added
moe_icp
configuration to control whether to display Moe ICP filing information. Disabled by default.moe_icp: icpnumber: # Moe ICP filing number
- For Hugo versions below v0.132.0, a new
alertBlockquote
shortcode has been added to display blockquotes, supporting multiple types{{< alertBlockquote type="?" >}} Your content here {{</alertBlockquote>}}
- type: specifies the type of blockquote. Available options:
note
,tip
,important
,warning
,danger
- type: specifies the type of blockquote. Available options:
- For Hugo v0.132.0 and above, support for using Hugo Blockquote render hooks to display Alert blockquotes
> [!NOTE] > Useful information that users should know, even when skimming content.
- Added support for Portuguese (Brazil) in multilingual settings.
- Replaced html2image with snapdom for generating screenshots.
Miscellaneous
- Updated mermaid to v11.10.1
- Updated qrcode to v1.5.1
- Updated dompurify to v3.2.6
- Updated fontawesome to v7.0.0
New Contributors
Full Changelog: v0.12.0...v0.12.1
v0.12.0
修复
- 修复标签云权重计算逻辑,确保在没有文章时构建不报错
- 修复 giscus 多语言兜底逻辑
特性
- 统一 css 阴影样式,新增以下 token:
--shadow-meta
--shadow-meta-hover
--shadow-card
--shadow-card-hover
--shadow-red-6-shadow
- Algolia 使用 SHA1 哈希作为 objectID
- 侧边栏支持 tag 和 category 的页面跳转
- 实验性新增
sort_order
配置,用于控制分类、标签、归档和首页的排序方式,未来可能会有重大变化- 支持的排序方式:
default
、date
、date-reverse
、weight
、weight-reverse
default
为 hugo 默认排序方式,详见 Hugo 文档date
为按日期排序,date-reverse
为按日期倒序排序weight
为按权重排序,weight-reverse
为按权重倒序排序- 默认情况下,
home
使用default
排序,archive
使用date-reverse
排序,taxonomy
使用date-reverse
排序 - 可以通过
categories_weight
和tags_weight
配置来控制分类页和标签页的文章权重 - 可以通过
weight
配置来控制归档和首页的文章权重
sort_order: taxonomy: category: date-reverse # controlled by categories_weight tag: date-reverse # controlled by tags_weight archive: date-reverse # controlled by weight home: default # controlled by weight
- 支持的排序方式:
heatMapCard
热力图新增自定义 tooltip 内容,支持点击显示文章列表- 新增
tagRoulette
shortcode 用于展示标签轮盘,提供随机标签展示功能,点击按钮后会从预定义的标签池中随机抽取并展示一个标签。{{< tagRoulette tags="?" icon="?" >}}
- tags:可选参数,指定标签池,多个标签用英文逗号(,)分隔;未提供时默认使用几个示例标签,例如:tags="记忆衰退,表达欲丧失,更加怠惰,无感,好想睡觉"
- icon:可选参数,自定义触发按钮的图标,默认使用 🕹️(游戏手柄emoji),可替换为任何emoji或文字,如 🎲、🎯、🔄 等
性能
- CSS 持续性 tree-shaking,现在评论相关样式会按需打包
instantsearch.js
替换为@reimujs/instantsearch.js
,以减少包体积
Fixes
- Fixed the tag cloud weight calculation logic to ensure no errors occur when building without articles
- Improved the giscus multilingual fallback logic
Features
- Unified CSS shadow styles and added the following tokens:
--shadow-meta
--shadow-meta-hover
--shadow-card
--shadow-card-hover
--shadow-red-6-shadow
- Algolia now uses SHA1 hash as objectID
- Sidebar now supports page navigation for tags and categories
- Added
sort_order
configuration to control the sorting method for categories, tags, archives, and the homepage (Experimental Feature, may be majorly changed in the future):- Supported sorting methods:
default
,date
,date-reverse
,weight
,weight-reverse
default
follows Hugo's default sorting method. Refer to the Hugo documentation for details.date
sorts by date, whiledate-reverse
sorts by date in reverse order.weight
sorts by weight, whileweight-reverse
sorts by weight in reverse order.- By default,
home
usesdefault
sorting,archive
usesdate-reverse
, andtaxonomy
usesdate-reverse
. - The
categories_weight
andtags_weight
configurations can be used to control article weights for category and tag pages. - The
weight
configuration can be used to control article weights for archives and the homepage.
sort_order: taxonomy: category: date-reverse # controlled by categories_weight tag: date-reverse # controlled by tags_weight archive: date-reverse # controlled by weight home: default # controlled by weight
- Supported sorting methods:
- Added custom tooltip content for the
heatMapCard
heatmap, supporting click-to-show article lists. - Added the
tagRoulette
shortcode to display a tag roulette, providing a random tag display feature. Clicking the button randomly selects and displays a tag from a predefined tag pool.{{< tagRoulette tags="?" icon="?" >}}
tags
: Optional parameter specifying the tag pool, with multiple tags separated by commas (,
). If not provided, default example tags are used, e.g.,tags="memory decline,lost desire to express,more lazy,indifferent,want to sleep"
.icon
: Optional parameter for customizing the trigger button icon. Defaults to 🕹️ (gamepad emoji), which can be replaced with any emoji or text, such as 🎲, 🎯, 🔄, etc.
Performance
- Continuous CSS tree-shaking; comment-related styles are now bundled on-demand.
- Replaced
instantsearch.js
with@reimujs/instantsearch.js
to reduce bundle size.
Full Changelog: v0.11.0...v0.12.0
v0.11.0
重大修改
- Hugo 最低版本要求升级至 v0.124.0 及以上
修复
- 修复 twikoo 评论系统无法正常使用的问题
特性
anchor_icon
支持传递false
以隐藏锚点图标
杂项
- 更新 mermaid 至 v11.6.0
- 更新 katex 至 v0.16.22
- 更新 twikoo 至 v1.6.44
Major Changes
- Minimum Hugo version requirement upgraded to v0.124.0 or higher
Fixes
- Fixed an issue where the Twikoo comment system could not be used properly
Features
anchor_icon
now supports passingfalse
to hide the anchor icon
Miscellaneous
- Updated Mermaid to v11.6.0
- Updated KaTeX to v0.16.22
- Updated Twikoo to v1.6.44
Full Changelog: v0.10.2...v0.11.0
v0.10.2
特性
menu.icon
支持图片路径,如/avatar/avatar.webp
menu: - name: home url: / icon: /avatar/avatar.webp
- vendor 中的 css 支持 SRI
Features
- Added
menu.icon
configuration to support image paths, such as/avatar/avatar.webp
menu: - name: home url: / icon: /avatar/avatar.webp
- Vendor CSS now supports SRI
New Contributors
Full Changelog: v0.10.1...v0.10.2
v0.10.1
修复
- 修复了当开启
expand
配置时,AOS 运行异常导致部分元素无法正常显示的问题 - 优化 Aplayer 样式
Fixes
- Fixed the issue where AOS was running abnormally when the
expand
configuration was enabled, causing some elements to not display properly - Optimized Aplayer styles
Full Changelog: v0.10.0...v0.10.1
v0.10.0
修复
- 修复移动端导航栏溢出时无法滚动的问题
- 修复 gitalk id 错误的问题
- 修复
only_show_capsule_in_index
展示逻辑 - 修复
home_categories
展示和跳转逻辑
特性
- 新增
email
配置用于 RSS 支持email: [email protected]
- RSS 支持更多配置
rss: limit: 10 # The number of recent articles to be output, write -1 to output all showFullContent: false # output full content or description showCopyright: false # If true, add copyright to the end of article.
- 适配和优化 valine / waline / gitalk 样式
- valine 新增
serverURLs
配置用于指定服务器地址valine: serverURLs: # valine server url
- 多语言模式下支持切换语言
- valine / waline / twikoo / gitalk /giscus 支持多语言,且
valine.lang
、waline.lang
、giscus.lang
配置废弃 comment.title
、preloader.text
、clipboard.success
、clipboard.fail
、outdate.message
支持多语言,且同时兼容旧有字符串写法# Example comment: # comment system title title: en: Leave a comment zh-CN: 说些什么吧! zh-TW: 說些什麼吧! ja: コメントを残す
algolia_search.label
和clipboard.copyright.license
配置废弃,转而使用 i18n 支持多语言clipboard.copyright
和article_copyright.content
新增license_type
配置用于配置版权类型,详情见 creativecommons,默认为by-nc-sa
article_copyright: content: license_type: by-nc-sa clipboard: copyright: license_type: by-nc-sa
Fixes
- Fixed the issue where the mobile navigation bar couldn't scroll when overflowing
- Fixed the incorrect Gitalk ID issue
- Fixed the display logic for
only_show_capsule_in_index
- Fixed the display and navigation logic for
home_categories
Features
-
Added
email
configuration for RSS supportemail: [email protected]
-
Enhanced RSS configuration options
rss: limit: 10 # The number of recent articles to be output, write -1 to output all showFullContent: false # Output full content or description showCopyright: false # If true, add copyright to the end of the article
-
Improved styling compatibility for Valine, Waline, and Gitalk
-
Added
serverURLs
configuration for Valine to specify server addressesvaline: serverURLs: # Valine server URL
-
Added language-switching support for multilingual modes
-
Added multilingual support for Valine, Waline, Twikoo, Gitalk, and Giscus. Deprecated
valine.lang
,waline.lang
, andgiscus.lang
configurations -
Added multilingual support for
comment.title
,preloader.text
,clipboard.success
,clipboard.fail
, andoutdate.message
, while maintaining backward compatibility with string-based configurations# Example: comment: # Comment system title title: en: Leave a comment zh-CN: 说些什么吧! zh-TW: 說些什麼吧! ja: コメントを残す
-
Deprecated
algolia_search.label
andclipboard.copyright.license
configurations in favor of i18n support -
Added
license_type
configuration forclipboard.copyright
andarticle_copyright.content
to specify license types (default:by-nc-sa
). Refer to Creative Commons for details.article_copyright: content: license_type: by-nc-sa clipboard: copyright: license_type: by-nc-sa
New Contributors
- @GuZhengSVT made their first contribution in #44
Full Changelog: v0.9.0...v0.10.0