Hudocs organizes documentation inside a dedicated docs/ section, keeping the root of content/ available for homepages, blogs, and other standalone pages.

Multi-Version Architecture #

By default, Hudocs organizes versions as subdirectories inside content/docs/:

content/
├── _index.md
├── docs/
│   ├── _index.md
│   ├── latest/
│   │   ├── _index.md
│   │   ├── getting-started/
│   │   │   ├── _index.md
│   │   │   ├── installation.md
│   │   │   └── ...
│   │   └── guides/
│   │       ├── _index.md
│   │       └── ...
│   ├── 1.8/
│   │   ├── _index.md
│   │   └── ...
│   └── 1.0/
│       ├── _index.md
│       └── ...
├── blog/
└── pages/

Each subdirectory within docs/ (latest, 1.8, 1.0) represents an isolated version with its own navigation tree, pagination, and search index. Hudocs provides a version switcher in the header to navigate between them.

Single-Version Architecture #

For sites without multiple versions, place documentation content directly inside content/docs/:

content/
├── _index.md
└── docs/
    ├── _index.md
    ├── installation.md
    └── configuration.md

Hudocs automatically detects single-version mode when no version subdirectories exist or when configured via params.docs_versions = false.

Content Files #

Section Index #

Sections use _index.md to define their title, icon, and behavior. To redirect a section to a page:

---
title: Getting Started
icon: rocket
layout: redirect
redirect: "/installation"
weight: 1
---

Content Pages #

Individual pages use Markdown files with front matter:

---
title: Installation
icon: download
weight: 1
badge: true
badge_text: "v2.0"
---

Page content...

Multilingual Files #

To create a translation, use Hugo’s multilingual support. For example, add the language code to the filename:

  • page.md: default language.
  • page.es.md: Spanish translation.

Hugo automatically links files belonging to the same page. Any multilingual content structure supported by Hugo is also supported by Hudocs.

Front Matter Reference #

FieldTypeDescription
titlestringPage title.
descriptionstringPage description for metadata and post summaries.
iconstringIcon from Meteor Icons.
datestringPublication date (primarily used for posts).
tagsstring[]List of tags associated with the page or post.
weightintOrder in the menu.
badgebooleanDisplays the badge.
badge_textstringBadge text.
badge_urlstringBadge destination URL.
hiddenbooleanHides the page from the menu.
tocbooleanDisables the Table of Contents when set to false.
layoutstringCustom layout (e.g. "redirect", "blank").
redirectstringDestination path for layout: redirect.