Solitude for Hugo is an open-source Hugo blog theme — a native port of Hexo Theme Solitude — that supplies content creators with a card-based visual style, PJAX transitions, local search and a build process that needs no Node.js. The theme, which targets Hugo v0.164.0 and newer, outputs a full blog with homepage, post pages, archives, categories, tags, special pages and standard Hugo feeds from plain Markdown content.
What is Solitude for Hugo?
Solitude for Hugo is a Hugo-specific rewrite of the Hexo Theme Solitude, implemented with Hugo templates, Pipes, Menus, Taxonomies and Page Collections instead of a thin wrapper. What goes in is standard Hugo blog content — Markdown files with front matter (title, date, lastmod, description, cover, categories, tags, comment, aside, toc, home) plus optional YAML data files — and what comes out is a complete, responsive blog front-end. It is built and maintained by everfu on GitHub under the Apache-2.0 license, and the visual design is authorized by its original designer, 张洪 Heo.
Key Features
- Full page coverage — Home, post, archive, category, tag, pagination, 404 and responsive layouts are all included out of the box.
- Special pages — Includes About, Links, Equipment, Music, Message, Brevity and Recent Comments templates; the About, Links, Equipment and Brevity pages read content from example YAML data files shipped with the theme.
- Native Hugo outputs — RSS, Sitemap, robots.txt, related content, table of contents, word count and reading time are produced by Hugo itself.
- Interactive shell — PJAX, light/dark mode, local search (
type: local), keyboard shortcuts, right-click menu, lightbox and music integration are part of the theme. - Five comment backends — Twikoo, Waline, Valine, Giscus and Artalk; Valine can supply comment count, view count, recent comments and comment barrage in addition to comments.
- Build without bloat — CSS modules are compiled from a single entry (
assets/css/solitude/main.css) and TypeScript via Hugo'scss.Buildandjs.Build; no Node.js, npm, PostCSS, Sass or Stylus is needed. - On-demand Shiki highlighting — Shiki is injected from a configurable CDN only when a code block exists, and it renders both light and dark themes plus optional line numbers, copy button and
max_height(set to 0 for unlimited). - Custom CSS override path — A site-level
assets/css/custom.cssis loaded after the theme's CSS so users can override styles without copying theme files or using!important.
Who should use Solitude for Hugo?
- Content creators and bloggers — Want the polished Solitude look with homepage recommendations and sidebar without switching away from a Markdown-first workflow; they can copy
exampleSite/hugo.yamland start writing. - Developers avoiding Node.js toolchains — Need a featureful theme they can build with only Hugo and Git installed (Hugo v0.164.0+); this removes package-manager dependency and CI friction.
- Former Hexo Theme Solitude users — Want the same visual language and card interactions after migrating to Hugo; the documentation lists the mapping from Hexo config to
params.solitude, fromupdatedtolastmod, and from Hexo tags to Hugo shortcodes.
What can you do with Solitude for Hugo?
- A brand-new blogger: preview a complete site immediately by running
hugo server --source exampleSite --themesDir ../.. --theme solitude, which loads an example site with homepage recommendations, sidebar, posts, special pages, comments, shortcodes and data files. - A post-heavy publisher: hide individual posts from the homepage list, recommendations and recent-post sidebar with
home: falsewhile keeping them in archives, categories, search, RSS and their own page. - A site maintainer: control per-page layout by setting
aside,tocandcommentfront matter booleans to toggle the sidebar, table of contents and comment area on any page. - A front-end developer: attach custom script behavior through
window.Solitudemethods and receive lifecycle events (ready,beforeNavigate,afterNavigate,themeChange) for clean PJAX integration.
How does Solitude for Hugo work?
Solitude works as a normal Hugo theme: after enabling theme: solitude in hugo.yaml, you also list the output formats the theme depends on — HTML, RSS, Search and Links for home, plus HTML and RSS for sections, taxonomies and terms. On page loads, the theme compiles its modular CSS and TypeScript with Hugo Pipes, and when code blocks are present it fetches Shiki from a CDN (default https://esm.sh/[email protected]) and generates syntax-highlighted output in both light and dark schemes. All theme-specific configuration lives under params.solitude so Hugo-standard behavior still uses Hugo-standard settings.
FAQ
Is Solitude for Hugo free to use?
Yes. The theme is released under the Apache-2.0 license and is open source on GitHub. You are free to use and modify it for personal or commercial sites as long as you preserve the theme copyright attribution.
Do I need Node.js or npm to use Solitude for Hugo?
No. The build only requires Hugo v0.164.0 or higher and Git for the submodule installation. No Node.js, npm, PostCSS, Sass or Stylus is used anywhere in the build pipeline.
Which comment services does Solitude for Hugo support?
Five services are built in: Twikoo, Waline, Valine, Giscus and Artalk. Valine can also provide post view counts, comment counts, recent comments and a comment barrage. The theme no longer bundles busuanzi or Google AdSense as legacy extras.
What is the minimum Hugo version?
Hugo v0.164.0 or newer is required. The theme uses recent Hugo features such as Pipes (css.Build, js.Build) and Page Collections that older releases do not have.
Does migrating from Hexo require any content changes?
Yes, if you are coming from Hexo Theme Solitude. You must map Hexo configuration to Hugo settings and params.solitude, rename updated to lastmod, replace Hexo tags with Hugo shortcodes, and rebuild the About, Links, Equipment and Brevity data files under the new structure.







