This article documents the differences between hugo-theme-reimu and hexo-theme-reimu themes, and how to migrate articles from hexo-theme-reimu to hugo-theme-reimu.
This article assumes you have already installed the hugo-theme-reimu theme and created your own configuration file following the guide.
Differences between Hexo and Hugo
- Hugo doesn’t support Hexo’s multi-level
categories
, only single-levelcategories
andtags
are supported - Hugo doesn’t support Hexo’s monthly and yearly archives
Basic Structure
The basic structure differs between hugo-theme-reimu and hexo-theme-reimu themes:
- Original
_config.reimu.yml
migrates toconfig/_default/params.yml
vendor
configuration from original_config.reimu.yml
migrates todata/vendor.yml
- Original
source/_data/covers.yml
migrates todata/covers.yml
- Original
source/friend/_data.yml
migrates todata/friends.yml
- Original
source/_data/avatar/avatar.webp
migrates tostatic/avatar/avatar.webp
Basic Configuration Changes
Hugo adds the following new configurations:
1 | + mainSections: ["post"] # Specify main sections, referring to article writing folders |
(Compared to < v1.0.0, after v1.0.0 hexo and hugo unified configurations) Changed the menu
configuration structure:
1 | menu: |
Additionally, all paths in the configuration are relative paths and don’t need leading /
:
1 | - banner: "/images/banner.webp" |
Widget
Widget removed the archive
configuration:
1 | widgets: |
Removed archive_type
and show_count
configurations:
1 | - archive_type: "monthly" |
favicon
Now uses static/favicon.ico
as the default favicon, no longer supports favicon configuration.
1 | - favicon: "/images/favicon.ico" |
Open Graph
Removed default_og_image
configuration, now uses banner
as the default Open Graph image.
1 | open_graph: |
Site Search
Local search is not supported, only Algolia search is supported.
1 | - generator_search: |
Since hugo.toml
cannot be read, Algolia needs additional appID
, apiKey
, and indexName
configurations:
1 | algolia_search: |
Math Formulas
Now uses Front Matter to enable formula rendering, math.enable
configuration removed.
- KaTeX only supports client-side rendering, so
math.katex.autoRender
configuration removed. - MathJax3’s
options
configuration needs to be wrapped in[]
(excluding Hugo’s built-in configuration reading logic).
1 | math: |
Mermaid
Original configuration removed. Now uses Front Matter to enable Mermaid.
1 | - mermaid: |
RSS
Hugo supports RSS by default, original configuration removed.
1 | - rss: atom.xml |