Back to templates

Template details

Onyx

A Hugo documentation theme forked from Hugo Alabaster, indirectly ported from Sphinx.

About this template

Onyx is a documentation theme for Hugo, forked from the Hugo Alabaster theme and indirectly ported from Sphinx, designed to build documentation sites with a familiar sidebar-based layout.

What is Onyx?

Onyx is a Hugo theme component that provides a documentation-oriented layout inherited from the Alabaster design. It takes a Hugo site's content (such as Markdown files for documentation) and renders it into a structured documentation site with a sidebar navigation. The theme runs on Hugo, requires a Go installation to use Hugo Modules, and was created by Kaushal Modi (based on the repository URL). It is an indirect port of the Sphinx documentation system's Alabaster theme, adapted from Digitalcraftsman's Hugo Alabaster theme.

Key Features

  • Hugo Modules based — Onyx is installed as a Hugo Module rather than a Git submodule; you add its import path to your site's TOML config and run hugo mod tidy to fetch it.
  • Two theme components — The theme is composed of the base "hugo-onyx-theme" plus the auto-fetched "hugo-debugprint" component, which is pulled in automatically via hugo mod.
  • Sphinx-inspired documentation layout — It inherits the Alabaster sidebar design originally from Sphinx, giving documentation sites a classic look with a navigation sidebar.
  • BSD license — Released under the BSD license, allowing reuse and modification with few restrictions.
  • Demo available — A live demo is hosted at hugo-onyx.netlify.com, showing the theme in action.
  • Requires Go and modern Hugo — Since it relies on Hugo Modules, you need to install Go from go.dev/doc/install; the latest version of Hugo is recommended, with testing last done on v0.92.0.

Who is it for?

  • Documentation site maintainers — Build a project documentation site with a familiar sidebar and a low-config setup by importing the module into an existing Hugo site.
  • Hugo users — Developers who already use Hugo and want a theme that uses the modern module system for dependency management.
  • Developers who like Sphinx-style documentation — If you prefer the look and organization of Sphinx/Alabaster docs but want to stay in the Hugo ecosystem, Onyx offers that visual and structural style.

What can you do with Onyx?

  • Create software documentation websites — Generate a documentation site for an open-source project with pages organized in a sidebar, similar to Read the Docs.
  • Set up a documentation site quickly — With only a few TOML lines and a hugo mod tidy command, a new Hugo site can adopt Onyx as its theme.
  • Share documentation with a live demo — Use the provided demo deployment to preview the theme's behavior before committing to it.

How does Onyx work?

Onyx uses Hugo's component system. You add the module import path to your site's configuration file, then run hugo mod tidy in your main site directory. The theme automatically fetches both its base and the debugprint component during the build process.

Pros and cons

  • Pros: No git submodules; component auto-fetching simplifies maintenance; BSD license gives broad reuse rights; demo helps assess suitability.
  • Cons: Requires installing Go separately because hugo mod commands need it; not tested on older Hugo versions (only v0.92.0 and later).

Pricing

Onyx is free and open source under the BSD license. There are no pricing tiers or paid plans mentioned.

FAQ

Is Onyx free?

Yes, Onyx is released under the BSD license, which permits free use, modification, and redistribution with attribution.

What are the requirements for Onyx?

You need Go installed (from go.dev/doc/install) because the theme uses Hugo Modules, and a current Hugo version (the theme was last tested with v0.92.0).

How do I install Onyx?

Add github.com/kaushalmodi/hugo-onyx-theme to your site's module.imports in the TOML config, then run hugo mod tidy in your site directory.

What is the difference between Onyx and Alabaster?

Onyx is a Hugo theme; Alabaster is a Sphinx theme for Python documentation. Onyx is a fork of Hugo Alabaster, which is itself an indirect port of Sphinx's Alabaster.

screenshot of Onyx on template0.com