Documentation
Installation
DataLeaf requires Hugo 0.158.0 or later (standard or Extended edition) and Git. Hugo 0.158 introduced the language locale, label, and direction APIs used by the theme. No Sass pipeline or Extended-only functionality is required. Hugo Modules also requires Go 1.22 or later.
Check your Hugo installation:
hugo versionGit submodule
#From the root of an existing Hugo site:
git submodule add https://gitlab.com/DiogoRibeiro7/dataleaf.git themes/dataleafThen enable the theme in hugo.toml:
theme = "dataleaf"To update later:
git submodule update --remote --merge themes/dataleafHugo module
#Initialize Hugo modules in your site if you have not already:
hugo mod init example.com/my-siteAdd DataLeaf as a module import:
[module]
[[module.imports]]
path = "gitlab.com/DiogoRibeiro7/dataleaf"Then resolve the module:
hugo mod getThe public DataLeaf repository needs no credentials. If you use a private fork, authenticate Git for its host and set GOPRIVATE to the fork’s module path, such as GOPRIVATE=gitlab.com/your-group/*, so Go bypasses the public module proxy and checksum service. Never put credentials in site configuration.
Minimal configuration
#A small working configuration is:
baseURL = "https://example.com/"
title = "My site"
theme = "dataleaf"
defaultContentLanguage = "en"
[languages.en]
locale = "en-US"
label = "English"
direction = "ltr"
[pagination]
pagerSize = 10
[taxonomies]
tag = "tags"
category = "categories"
[params]
description = "Technical notes and long-form articles."When installing DataLeaf as a Hugo module, omit the theme line and use the module import instead.
Mathematics
#If you want DataLeaf’s mathematical render hook, enable Goldmark passthrough delimiters:
[markup]
[markup.goldmark]
[markup.goldmark.extensions]
[markup.goldmark.extensions.passthrough]
enable = true
[markup.goldmark.extensions.passthrough.delimiters]
block = [['\[', '\]'], ['$$', '$$']]
inline = [['\(', '\)']]By default DataLeaf renders supported mathematics at Hugo build time.
Verify the site
#Run:
hugo serverFor a production check:
hugo --gc --minifyContinue with the Configuration reference.