Hudocs is a documentation theme for Hugo focused on multi-version documentation, allowing you to document multiple versions of a project within a single site.
Ultra lightweight — zero initial configuration.
Prerequisites #
Before installing Hudocs, make sure you have:
- Hugo Extended
0.164.0or higher.- Hudocs uses Sass to compile its stylesheets.
- Verify the installed version with
hugo version - The output must include
extended.
- Git installed and available in the terminal to clone the repository or manage submodules.
Installation #
Git Submodule #
A submodule lets you keep the Hudocs code separate from your site repository and update it whenever needed.
git submodule add https://github.com/zkreations/hudocs themes/hudocs
To update the submodule:
git submodule update --remote --merge
Hugo Modules #
Hugo Modules lets you manage Hudocs as a Go dependency.
Initialize the module #
Initialize your site’s module, replacing the path with your repository’s:
hugo mod init github.com/your-username/my-docsAdd Hudocs #
Add Hudocs to
hugo.toml:theme = "github.com/zkreations/hudocs"Download the module #
Download Hudocs and its dependencies:
hugo mod get github.com/zkreations/hudocs
Direct Clone #
You can clone Hudocs directly into themes/ if you need to modify its source code:
git clone https://github.com/zkreations/hudocs themes/hudocs
Example Site #
The exampleSite directory contains a configuration and content you can use as a starting point.
When using Git Submodules or Direct Clone, copy the example files directly from the themes/ directory:
Copy the example files #
Copy the example configuration and content to the root of your project:
cp themes/hudocs/exampleSite/hugo.toml . cp -R themes/hudocs/exampleSite/content .If you installed via Hugo Modules, you can download or copy these files directly from the GitHub repository.
Start the server #
Start the development server:
hugo serverOpen the site #
Open
http://localhost:1313/in your browser.
Next Steps #
See the Configuration guide to set up theme options, branding, and multilingual support.