Hexo Theme Melody is an open-source blog theme for the Hexo static site generator that converts Markdown posts into a fast, mobile-responsive website. Created by Molunerfinn and released under the MIT license, it offers built-in Algolia search, Baidu and Google analytics, MathJax, and a bilingual interface.
What is Hexo Theme Melody?
Hexo Theme Melody is a blog theme for Hexo 3.0 and above, distributed both as a GitHub repository and as an npm package for Hexo 5.0+. It takes your site's Markdown content and renders it into archive, post, and mobile layouts using Pug and Stylus templates. The theme's own configuration file keeps customization separate from the theme source, so updates don't overwrite your settings. Documentation is available in English and Simplified Chinese.
Key Features
- Algolia search — Supports Algolia out of the box; you only need to supply your app credentials in the config.
- Analytics integration — Includes native support for both Baidu Tongji and Google Analytics.
- MathJax rendering — Renders LaTeX equations in posts when enabled, a boon for technical blogs.
- i18n — Ships with Simplified Chinese (zh-Hans) and English translations, with an extension point for more languages.
- PWA support — Added in v1.2, enabling offline caching and installable web-app behavior.
- Separate config file — All theme settings live in
melody.yml(pre-5.0) or_config.melody.yml(5.0+), allowing painless theme updates. - Mobile-first layout — The design includes a dedicated mobile view, as shown in the official screenshots.
- Broad browser support — Works on IE 10 and all modern browsers.
Who should use Hexo Theme Melody?
- Hexo site owners — If you already run a Hexo blog and want search, analytics, and a clean design without juggling many plugins.
- Bilingual bloggers — The built-in zh-Hans and en localization saves you from hand-translating theme strings.
- Technical writers and academics — MathJax support makes it practical for blogs with equations, formulas, or scientific notation.
- Developers on Hexo 5.0+ — npm installation and the
_config.melody.ymlfile simplify dependency management and upgrades.
What can you do with Hexo Theme Melody?
- Add site search quickly — Configure Algolia credentials in the theme config to let visitors search all posts from the search interface.
- Track traffic with Chinese or global analytics — Drop in a Baidu or Google Analytics ID and start collecting stats without additional plugins.
- Publish equation-heavy posts — Enable MathJax per-post or globally so LaTeX renders cleanly in your articles.
- Localize your theme — Use the i18n system to switch UI labels between English and Simplified Chinese, or add another language file.
How does Hexo Theme Melody work?
Installation differs by Hexo version. For Hexo below 5.0, clone the repository into themes/melody and install hexo-renderer-pug and hexo-renderer-stylus. For Hexo 5.0+, run npm install hexo-theme-melody and then copy the theme's _config.yml to _config.melody.yml. Set theme: melody in your site's root config, then hexo generate builds the site through the Pug and Stylus renderers.
Pros and cons
- Pros: Free under MIT; rich built-in features (search, analytics, MathJax, i18n, PWA); separate config file eases updates; mobile responsive; supports Hexo 3.0 and later.
- Cons: Requires installing
hexo-renderer-pugandhexo-renderer-stylusif they're not already present; the configuration file format changed at Hexo 5.0, so upgrading from an older setup means migratingmelody.ymlto_config.melody.yml.
FAQ
Is Hexo Theme Melody free?
Yes, it is open source under the MIT license, so it is free to use for personal or commercial blogs.
How do I install hexo-theme-melody?
For Hexo versions older than 5.0, use git clone -b master https://github.com/Molunerfinn/hexo-theme-melody themes/melody. For Hexo 5.0 and above, run npm install hexo-theme-melody in your project root. After that, set theme: melody and install the pug and stylus renderers.
Does hexo-theme-melody support search?
Yes, the theme includes Algolia search support. Add your Algolia application ID and search API key to the theme config to enable it.
Does hexo-theme-melody support MathJax?
Yes, MathJax is supported. You can enable it in the theme config or per-post, and LaTeX equations will render in the generated HTML.
Which browser versions are supported?
The theme states support for IE 10 and above, and it is compatible with all modern browsers.




