Skip to content

Getting started

Install hugodoks in a new Hugo project and publish your first docs page.

This guide takes a brand-new Hugo project to a running documentation site in a few minutes.

Requirements

  • Hugo Extended >= 0.154.0 — check with hugo version. The theme needs the extended edition for its asset pipeline.
  • Git and Go — only if you install the theme as a Hugo module (recommended below).

1. Create a site

hugo new site my-docs
cd my-docs

2. Add the theme

Initialize the site as a Go module, then import the theme in hugo.toml:

hugo mod init github.com/you/my-docs
hugo mod get github.com/fernandezvara/hugodoks
[module]
  [[module.imports]]
    path = "github.com/fernandezvara/hugodoks"

3. Required settings

hugodoks defines a searchindex output format that produces /index.json — the data source for the search modal. Hugo does not merge outputs from a theme’s config, so declare it yourself:

# hugo.toml
[outputs]
  home = ["html", "rss", "searchindex"]

[markup.highlight]
  # Emit CSS classes instead of inline styles so the theme's
  # light/dark code stylesheets apply.
  noClasses = false

4. Add your docs

Documentation pages live under content/docs/. The section index becomes the docs landing page; every page can set an icon, a weight and a toc flag:

hugo new docs/_index.md
hugo new docs/getting-started.md
---
title: "Getting started"
description: "One line shown in cards, search results and meta tags."
icon: "rocket-launch"
weight: 100
toc: true
---

5. Run it

hugo server

Open http://localhost:1313/docs/ — the sidebar lists your pages, Ctrl K opens search, and the header button toggles dark/light theme.

Next steps

Make it yours

Write content

Edit this page · Last updated 01 Jan 0001