Skip to content

Releases: D-Sketon/hexo-theme-reimu

v1.3.1

02 Feb 08:14
Compare
Choose a tag to compare

修复

  • 修复了代码块存在横向滚动条时行号和代码块不对齐的 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

05 Jan 04:17
Compare
Choose a tag to compare

修复

  • 修复了自定义封面时 pjax 失效的 bug
  • 修复了点击侧边栏按钮进行跳转时 pjax 失效的 bug
  • 修复了当标题以数字开头时 TOC 无法正常显示的 bug
  • 修正样式

特性

  • 新增了 share 配置用于开启分享功能,目前支持 facebooktwitterlinkedinredditweiboqqweixin
    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 supports facebook, twitter, linkedin, reddit, weibo, qq, and weixin.

    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 article front-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 new cursor 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

28 Dec 13:08
Compare
Choose a tag to compare

修复

  • 修复 home_categories 只能填写一个以上分类的 bug

特性

  • 新增了 live2d_widgets 配置用于开启/关闭 live2d-widgets

    live2d_widgets:
      enable: true # true | false
      position: left # left | right
  • toplive2d 新增 position 配置,用于控制其位置

    top:
      enable: true # true | false
      position: right # left | right
    
    live2d:
      enable: true # true | false
      position: left # left | right
  • 新增 player 配置用于配置 Aplayer / Meting 音乐播放器,使用前建议打开 pjax

    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:

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 for top and live2d 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

15 Dec 08:12
Compare
Choose a tag to compare

修复

  • 修复了客户端渲染下 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

07 Dec 07:51
Compare
Choose a tag to compare

修复

  • 修复了部分 css token 未统一的问题

特性

  • 添加了配置用于控制代码块的默认展开状态,expand 可以设置为 truefalse 或数字,数字表示当代码块的行数大于该数字时默认收缩。
    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 to true, 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

01 Dec 05:13
Compare
Choose a tag to compare

Warning

包含破坏性变更,升级前请仔细阅读版本日志

修复

  • 修复了 KaTeX 带有 tag 时会有多余的滚动条的 bug
  • 修复了 KaTeX 带有 tag 且宽度过小时会和左侧公式重叠的 bug
  • 修复了 giscus 评论不会随着日夜模式切换而改变主题的 bug,现在 giscuscommentTheme 配置无效
    giscus:
      commentTheme: # 无效的配置,现在主题由 reimu 托管了
  • 修复了 postLinkCard Tag 未对 excerpt 进行转义的 bug
  • 修复了 Github icon 在夜间模式下颜色不明显的问题
  • 同步了部分 transition 动画,使得动画更加统一

特性

  • 现在 KaTeX 服务端渲染建议使用 @reimujs/hexo-renderer-markdown-it-plus 插件,以支持最新的 KaTeX
  • 现在数学公式的配置结构发生了变化(与老配置不兼容)同时支持了 MathJax3KaTeX,且 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 配置,现在支持自定义 icon
    menu:
      - name: home
        url: /
        icon: # 不填默认使用太极图标
      - name: archives
        url: /archives
        icon: f0c1 # 你可以填写一个十六进制的数字来自定义 icon,支持 fontawesome 和 icon font
      - name: about
        url: /about
        icon:
      - name: friend
        url: /friend
        icon:
  • 重构了 footertopsponsor 配置,现在支持自定义 icon
    footer:
      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 配置,现在支持自定义加载动画 icon
    preloader:
      enable: true
      text: 少女祈祷中...
      icon: # 不填默认使用内链的svg(保证首屏加载速度),你可以填入一个链接来自定义加载图标,如 '/images/taichi.png'
  • 新增了 anchor_icon 配置,现在支持自定义锚点 icon
    anchor_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; the commentTheme configuration in giscus is now deprecated.
    giscus:
      commentTheme: # Deprecated, theme is now handled by reimu
  • Fixed bug where the postLinkCard tag didn't escape excerpt 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, and sponsor 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

v0.3.5

23 Nov 07:48
Compare
Choose a tag to compare

What's Changed

修复

  • 修复了 photoswipe 对于 gallery 可能加载异常的 bug
  • 修复了 photoswipe 对于常规图片可能加载异常的 bug
  • 修复了 basePath 含有子目录时静态资源加载异常的 bug
  • 修复了 externalLinkCard 的链接缺少 noopenner noreferrer 的 bug
  • 修复了首页卡片未对 excerpt 进行转义的 bug

Full Changelog: v0.3.4...v0.3.5

v0.3.4

16 Nov 10:23
Compare
Choose a tag to compare

What's Changed

修复

  • 各种乱七八糟的杂项修复
  • 优化 excerpt 的显示逻辑
    • excerpt 字段单用时仅仅作为摘要,不会作为文章内容显示,而仅仅出现在首页
    • excerpt 字段和 link 字段合用时,会作为文章内容显示,且文章会出现 Read More 按钮用于跳转

特性

  • 现在 quicklink 默认改为关闭

  • 代码高亮支持了 patch 语言类型

  • vendor 支持 SRI 校验:

    js:
      clipboard: 
        src: webcache|clipboard@2.0.11/dist/clipboard.min.js
        integrity: sha384-J08i8An/QeARD9ExYpvphB8BsyOj3Gh2TSh1aLINKO3L0cMSH2dN3E22zFoXEi0Q

性能

  • photoswipe 相关 js 现在只会在 page 和 post 页面加载
  • comment 相关 js 现在只会在 page 和 post 页面加载

重构

  • 重构了 layout,移除了无关的代码(可能会有 BUG,请及时反馈)

Full Changelog: v0.3.3...v0.3.4

v0.3.3

03 Nov 13:29
Compare
Choose a tag to compare

What's Changed

修复

  • 修复了 giscus 在首页和归档页面异常显示的 bug

Full Changelog: v0.3.2...v0.3.3

v0.3.2

02 Nov 04:39
Compare
Choose a tag to compare

What's Changed

修复

  • 修正了 front-matter 中文章版权声明配置读取逻辑。现在的逻辑为:
    • 首先读取文章的 front-matter 中的 copyright,如果不存在则再读取全局配置(保证与其他配置项一致)

特性

  • 搜索蒙层添加了动画效果

  • 新增了赞助功能,可以通过以下配置设置赞助信息

    sponsor:
      enable: false # true | false
      tip: 请作者喝杯咖啡吧! # 赞助提示
      qr:
        # - name: 支付宝
        #   src: "/sponsor/alipay.jpg"
        # - name: 微信
        #   src: "/sponsor/wechat.png"

    此外,也可以通过文章的 front-matter 控制,其优先级高于全局配置

    ---
    sponsor: true # 是否展示赞助二维码?
    ---
  • Open Graph 添加了 default_og_image 字段,用于设置默认的 Open Graph 图片(适用于主页、归档等无图页面)

    open_graph:
      options:
        default_og_image: /images/banner.webp # 默认 Open Graph 图片,同时支持绝对路径

性能

  • CSS 持续性 tree-shaking,现在 widget、copyright 和 sponsor 的样式都是按需打包的

Full Changelog: v0.3.1...v0.3.2