Skip to content
DataLeaf

Documentation

Hugo Themes distribution

DataLeaf includes a distribution package for the official Hugo Themes directory.

What the directory reads

#

The Hugo Themes Site Builder imports each listed theme as a Hugo Module directly from its Git host. It then reads:

  • theme.toml, for the name, description, license, authors, demo link, and tags;
  • hugo.toml, which upstream requires to declare the supported Hugo versions in [module.hugoVersion] (the directory does not currently display them);
  • images/screenshot.png (at least 1500×1000) and images/tn.png (at least 900×600), both 3:2. JPEG files are also accepted.

The repository also needs an open-source license and an English README.md that uses absolute image URLs.

Files come from the latest release tag that Go modules can see, or from the latest commit when there is no release. A change to the metadata or images reaches the directory only with a new release.

Go Modules

#

DataLeaf declares:

text
module gitlab.com/DiogoRibeiro7/dataleaf

in go.mod. This matches the repository entry that should be added to the Hugo Themes Site Builder. Release tags must have the form vMAJOR.MINOR.PATCH, optionally with a prerelease suffix. Go ignores tags that carry build metadata, and tags of version 2 or later unless the module path ends in /v2.

Validate locally

#
bash
npm ci --ignore-scripts
npm run quality:distribution

The validator parses theme.toml and hugo.toml with the same TOML parser as the directory. It also checks:

  • the metadata and module identity;
  • the Hugo version range against the versions CI tests;
  • the neutral example base URL;
  • the README image URLs;
  • the license;
  • the preview images: complete PNG decoding, dimensions, and aspect ratios;
  • that every package file is committed and included in Go module archives.

Before submitting, and after each release, run:

bash
npm run check:hugo-themes

This read-only check needs network access, Go, and Hugo. It resolves the module the way the directory does, reports which version would be used, runs the distribution checks on that version, and confirms the public links work without signing in.

Publication prerequisite

#

The repository and its GitLab Pages demo must stay public, and published tags must never be deleted. The submission checklist records the verified upstream behaviour and the remaining steps.