Hudocs is configured through your site’s main configuration file. This page describes the available options for setting up the theme.
Main Settings #
baseURL #
Base URL of the documentation site in production.
baseURL = 'https://example.com/'
enableRobotsTXT #
When set to true, Hugo generates a robots.txt file for the site.
enableRobotsTXT = true
enableInlineShortcodes #
When set to true, Hugo allows declaring inline shortcodes directly within Markdown content files.
enableInlineShortcodes = true
enableGitInfo #
When set to true, Hugo retrieves information from the Git repository to provide data about the last commit, such as the last modified date of a page.
enableGitInfo = true
disableKinds #
Disables content types that are not needed for a documentation site. This prevents Hugo from generating taxonomy pages, term pages, and RSS feeds.
disableKinds = ["taxonomy", "term", "RSS"]
Internationalization #
To enable multiple languages, define the available languages in the [languages] section. Each language requires an identifier, a label, and a weight that determines the order.
[languages.en]
label = "English"
weight = 1
[languages.es]
label = "Español"
weight = 2
Rendering and Markdown #
Markdown and syntax highlighting options are configured through the [markup] section.
HTML inside Markdown #
Allows processing HTML included directly in Markdown files. This option is required for shortcodes and components that use HTML.
[markup.goldmark.renderer]
unsafe = true
Syntax Highlighting #
Configures Chroma to generate CSS classes in code blocks instead of inline styles. This allows Hudocs to control code block styles according to the active visual theme.
[markup.highlight]
noClasses = false
Table of Contents #
Defines the heading levels included in the table of contents. With this configuration, <h2> and <h3> headings are included.
[markup.tableOfContents]
startLevel = 2
endLevel = 3
Theme Parameters #
Hudocs-specific options are configured inside [params]. Options are organized by functional scope:
Site #
description #
Global description used for metadata, Open Graph tags, Twitter cards, and the homepage.
description = "A Hugo theme for documentation sites"
image_first_eager #
When set to true, the first image in a page is loaded eagerly with loading="eager" and fetchpriority="high". The default value is true.
image_first_eager = true
Branding #
brand_icon #
Name of an icon from the Meteor Icons catalog displayed next to the site title in the header navbar. The default value is "book-open".
brand_icon = "book-open"
brand_logo #
Path to an image used as the logo. When defined, it replaces both the icon configured via brand_icon and the site title.
brand_logo = "images/logo.svg"
Documentation #
docs_section #
Root documentation section name. The default value is "docs".
docs_section = "docs"
docs_versions #
Explicit list and order of versions for the selector. If omitted, Hudocs automatically detects versions from content/docs/. Set to false for single-version mode.
docs_versions = ["latest", "1.8", "1.0"]
docs_expand_tree #
Expands all sections in the documentation sidebar navigation tree. When set to false, only the active section is expanded automatically. The default value is false.
docs_expand_tree = false
docs_pagination #
Controls documentation page navigation through “Previous” and “Next” links at the bottom of content. The default value is true.
docs_pagination = true
docs_edit_url #
Adds an edit link to the header of each documentation article. The link uses the pencil icon and points to the corresponding file in your Git repository.
docs_edit_url = "https://github.com/your-username/repository/tree/main/content"
docs_badge_text #
Default text displayed on documentation badges enabled across pages. If omitted, it defaults to the localized translation of "new" (i18n "new").
docs_badge_text = "New"
docs_badge_url #
Destination URL for globally configured documentation badges.
docs_badge_url = "https://example.com"
docs_ai #
Controls the AI Assistant action button in the header of documentation articles. When set to false, the AI dropdown is hidden. The default value is true.
docs_ai = true
docs_chatgpt #
Controls the “Open in ChatGPT” action inside the AI Assistant dropdown. The default value is true.
docs_chatgpt = true
docs_claude #
Controls the “Open in Claude” action inside the AI Assistant dropdown. The default value is true.
docs_claude = true
Code Blocks #
code_theme #
Configures the color theme for syntax-highlighted code blocks. The available themes are duotone-dark, duotone-dark-sky, duotone-dark-sea, duotone-dark-space, duotone-dark-earth, and duotone-dark-forest. The default value is duotone-dark.
code_theme = "duotone-dark"
Posts #
posts_paginate #
Defines the number of articles displayed per page on posts list pages. The default value is 10.
posts_paginate = 10
posts_date_format #
Defines the date format used for publication dates in post cards. The format follows Go’s date rules. The default value is 2006-01-02.
posts_date_format = "January 2, 2006"
Footer #
footer_date_format #
Defines the format used to display the last updated date of pages in the footer. The format follows Go’s date rules. The default value is 2006-01-02.
footer_date_format = "2006-01-02"
footer_copyright #
Defines the copyright text displayed in the site footer. The value supports Markdown. You can use {{Year}} to automatically insert the current year.
footer_copyright = "Created by [@zkreations](https://zkreations.com)"