Skip to content

v1.4.0

Compare
Choose a tag to compare
@D-Sketon D-Sketon released this 16 Feb 14:55
· 37 commits to main since this release

修复

  • 修复了 <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 for dark_mode, which automatically switches based on the user's system settings. The default mode is now auto.

    dark_mode:
      enable: auto # true | false | auto
  • Experimental integration of hexo-generator-i18n with multilingual switching support. You can configure i18n 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 an index.md file inside it, such as source/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 to true 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