Back to templates

Template details

Cactus

A Hugo theme for personal blogs, ported from Hexo Cactus, with configurable color themes, Disqus comments, MathJax, RSS, and Google Analytics.

About this template

Cactus is a Hugo theme for personal blogs, ported from the hexo theme Cactus by probberechts, that turns Hugo content into a single-column blog with configurable color schemes, Disqus comments, MathJax rendering, RSS, and Google Analytics.

What is the Cactus theme for Hugo?

Cactus is a Hugo theme for personal blogs, forked from the hexo theme Cactus. It runs on the Hugo static site generator and is installed by cloning the repository into the themes/cactus folder of a Hugo site, then setting theme = "cactus" in config.toml. The theme takes standard Hugo content (Markdown files with front matter) and outputs a static blog page that includes a homepage with recent posts, a tags overview, a projects list, and navigation defined by the site's main menu. The repository is maintained by monkeyWzr, offers a live demo on GitHub Pages, and is released under the MIT license.

Key Features

  • Color themes — Four built-in schemes (white, dark, light, classic) selected with a single colortheme parameter in the site config.
  • Custom CSS — Load additional stylesheets after the main theme CSS by listing them in the css parameter, e.g. css = ["css/custom.css"] loads from static/css/custom.css.
  • Flexible homepage — Show only the 5 most recent posts (default) or all posts with showAllPostsOnHomePage; set the main section via mainSection and rename the default "Writings" title with mainSectionTitle.
  • Inline table of contents — Place the post table of contents inline in the article instead of in the navigation menu by enabling tocInline.
  • Projects list — Display personal projects on the homepage by creating a data file at data/projects.yaml, data/projects.toml, or data/projects.json; the JSON format requires a list key containing objects with name, URL, and description.
  • Social media icons — Configure footer links for GitHub, email, LinkedIn, etc., using Font Awesome brand icons via [[params.social]] entries.
  • Comments and MathJax — Enable Disqus comments and MathJax rendering site-wide or per post through front matter; the default comment engine is Disqus, and the shortname falls back to the site title if not set.
  • Built-in integrations — Use Hugo's native Google Analytics templates and syntax highlighting (default style monokai), plus optional RSS generation at https://example.com/index.xml when rss = true.

Who should use Cactus?

  • Personal bloggers on Hugo who want a minimal, clean layout without a JavaScript-heavy framework.
  • Former Hexo/Cactus users migrating from Hexo to Hugo who want a familiar visual design, since this theme is a direct port of the Hexo Cactus theme.
  • Technical writers who need to publish posts with mathematical notation and code examples, thanks to MathJax and Hugo's built-in highlight support.
  • Developers at any skill level who are comfortable editing config.toml and a data file to customize navigation, projects, and social links.

What can you do with Cactus?

  • Publish a personal blog with minimal setup: Clone the theme, set your menu and description, write Markdown posts, and run hugo server to preview.
  • Add analytics and RSS: Set your Google Analytics tracking ID (UA- or G- format) in the site config, optionally enable asynchronous v3 tracking, and turn on RSS to generate a feed.
  • Render mathematical formulas: Set mathjax = true in config or per-post front matter to display LaTeX-style math in posts, with per-post settings overriding the site config.
  • Showcase projects: Maintain a projects.yaml, projects.toml, or projects.json file to list open-source projects with links and descriptions on the homepage.
  • Customize the look: Switch between the four color themes or provide your own CSS files without editing theme templates.

How does Cactus work?

Install by cloning the repository into themes/cactus, set theme = "cactus" in your site config, add the parameters you need from the README examples, then run hugo server to test locally and deploy using Hugo's standard hosting and deployment methods. The theme reads folder-based content (e.g., the posts section), the site menu, data files, and front-matter flags to render the final static site.

screenshot of Cactus on template0.com