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-levelcategoriesandtagsare 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.ymlmigrates toconfig/_default/params.yml vendorconfiguration from original_config.reimu.ymlmigrates todata/vendor.yml- Original
source/_data/covers.ymlmigrates todata/covers.yml - Original
source/friend/_data.ymlmigrates todata/friends.yml - Original
source/_data/avatar/avatar.webpmigrates 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.autoRenderconfiguration removed. - MathJax3’s
optionsconfiguration 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.
1 | - rss: atom.xml |
Leave a comment