Documentation
Upgrading
DataLeaf is still pre-1.0, so upgrades may include template or configuration changes.
Git submodule
#Fetch the latest theme commit:
git submodule update --remote --merge themes/dataleafThen rebuild locally:
hugo --gc --minifyCommit the updated submodule reference only after the site builds successfully.
Hugo module
#Update module dependencies:
hugo mod get -u gitlab.com/DiogoRibeiro7/dataleaf
hugo mod tidyThen run:
hugo --gc --minifyBefore upgrading
#Check:
- the DataLeaf release notes;
- the minimum Hugo version;
- any configuration changes;
- local template overrides;
- local CSS that targets DataLeaf component classes.
Template overrides deserve particular attention because Hugo will continue using your local copy even if the upstream theme template changes.
Editorial design system
#The visual design moved from rounded cards to an editorial system. Sites with custom CSS should check:
- reading text is now set in Source Serif 4, and the interface in IBM Plex Sans; both are bundled, and
--dl-font-serif,--dl-font-sans, and--dl-font-monoselect other fonts; - the palette changed to ink on paper, and the dark scheme is a separate palette rather than an inversion;
--dl-radiusis now0; form controls use the new--dl-radius-control;--dl-shadowand--dl-secondary-softwere removed;--dl-readingis now42remand--dl-reading-narrow37rem, so the layout no longer shifts when the fonts load; an override inchstill works but brings the shift back;- tags, taxonomy terms, and adjacent-article links are plain text on rules instead of pills and cards;
- the stylesheet is split into
assets/css/fonts.css,tokens.css, andmain.css, bundled into one file; a site that overrides the theme’smain.cssmust also provide the other two or keep the theme’s copies; --dl-flow-spaceis now1em, so paragraph spacing follows the text size;--dl-active-bgwas removed;- new tokens cover typeface roles, the spacing scale, line heights, tracking, layout widths, and the link, annotation, and mark colors; see Design tokens;
params.fonts.bundled = falsedisables the bundled fonts.
Masthead
#The header became a publication masthead: the site title on its own line, then a bar with the main menu and the site tools. Check:
- the header links to the search page automatically when search is enabled, so remove any
Searchentry frommenus.main; the site title links home, so aHomeentry is optional; - the language links and theme selector moved into
.dataleaf-tools, and.dataleaf-header__actionswas removed; the bar is.dataleaf-header__bar; - main-menu links are plain text in the reading color, the tools smaller and muted; the theme selector is no longer a bordered button.
Front page
#The home page hero was replaced by an editorial front page. Check:
.dataleaf-hero,.dataleaf-hero__lede, and.dataleaf-sectionwere removed; the front page uses.dataleaf-frontwith__intro,__latest, and__topics, plus.dataleaf-featureand.dataleaf-entry;- the home page’s
titleis now its main heading, so givecontent/_index.mda title that states what the site is about; _partials/summary.htmloverrides still apply to front-page summaries;--dl-text-displayis smaller, at most3rem.
Manuscript layout
#Articles became a manuscript layout. Check:
- the metadata and tags moved out of
.dataleaf-article__headerinto.dataleaf-article__meta, which sits with the table of contents in.dataleaf-article__rail; the header now holds the section, title, and a.dataleaf-article__deksubtitle from the page description; - from 72rem,
.dataleaf-articleis a grid with the rail (--dl-rail) beside the reading column, and the table of contents is sticky; it is no longer a box; - tables, display equations, and code wider than
--dl-readingmay extend up to--dl-wide-content; figures do so when marked{.wide}; --dl-text-3xl, the article title size, is smaller, at most2.5rem;- previous and next links form a ruled row instead of two blocks, and the article components use logical properties, so they mirror on right-to-left sites.
Scientific presentation
#Technical content moved from component-library styling to scientific typesetting. Check:
- code blocks sit on a light tint of the page in light mode, no longer a dark panel; syntax colors are the new
--dl-code-comment,--dl-code-keyword,--dl-code-string,--dl-code-function, and--dl-code-numbertokens; - statements have no tinted background:
--dl-statement-bg,--dl-definition-bg,--dl-remark-bg, and--dl-example-bgwere removed, and theorem bodies are italic; - callouts lost their outer border:
--dl-callout-border,--dl-tip-border,--dl-warning-border, and--dl-important-borderwere removed; - tables use journal rules instead of cell borders and a tinted header; figures lost their frame, and captions sit below a hairline.
Discovery pages
#Lists, taxonomies, the archive, and search became one editorial index. Check:
- section and term lists, documentation contents, and search results use the front page’s entry row,
.dataleaf-entrywith__title,__summary,__aside,__date,__meta, and__terms, from the new_partials/entry.html;.dataleaf-entry__body,.dataleaf-post-list,.dataleaf-post-card, and.dataleaf-search-result__titlewere removed, and search results keep.dataleaf-search-resultas a hook; - discovery pages use
.dataleaf-indexwith a shared_partials/index-header.htmlinstead of.dataleaf-reading, which was removed; from 72rem they follow the article grid, with dates and metadata in the rail; - taxonomy pages list terms alphabetically by title in
.dataleaf-termsinstead of by count in.dataleaf-term-list; - archive years show their number of entries, and the search field is set on a rule with a text button rather than as a boxed control;
- entry and search dates use Hugo’s
:date_mediumformat, also in the search index’sdateLabel; - the new
contentslayout lists a section on one page; the example documentation uses it; - two interface strings are new,
contentsandentry_count; add them to your own translation tables, or builds run with--panicOnWarningstop at the English-fallback warning.
Dark mode and responsive polish
#The dark palette, browser interface color, and small-screen behavior were refined. Check:
- strong rules (tables, list openings, archive years, pagination, previous and next, and the search field) use the new
--dl-ruletoken instead of--dl-text; it is ink in light mode and a softer grey in dark mode, so override it alongside--dl-textif you changed the text color; - the page head has one
theme-colorper color scheme, matching--dl-bg, and the theme selector points the browser at the chosen scheme; - previous and next articles sit side by side from 40rem instead of 48rem; the theme now uses four breakpoints, listed in the design tokens reference;
- pagination arrows are wrapped in
.dataleaf-pagination__arrowand mirror on right-to-left pages; - code blocks, inline code, and display mathematics are set left to right on right-to-left pages;
- in forced colors, highlighted code lines take the system highlight and unavailable pagination the system grey text.
Layout stability
#The page no longer shifts while the bundled fonts load. Check:
--dl-readingand--dl-reading-narroware inrem; keep overrides inrem, because achwidth changes when the fonts arrive;--dl-font-serifand--dl-font-sansname"Source Serif 4 Fallback","Source Serif 4 Times Fallback", and"IBM Plex Sans Fallback"after the bundled families. These metric-matched faces exist only with the bundled fonts; if you replace the bundled families with your own web fonts, drop them or define fallbacks that match your fonts.
Pinning
#For reproducible production sites, pin DataLeaf to a release tag rather than tracking the latest commit continuously.
Release-readiness migration
#Use Hugo 0.158.0 or later. Standard Hugo is sufficient. Move local overrides from layouts/_default/single.html to layouts/single.html, from layouts/_default/terms.html to layouts/taxonomy.html, and from layouts/partials/ to layouts/_partials/. Apply the same root-layout migration to baseof.html, list.html, search.html, and archives.html.
Copy the complete search output configuration from Configuration. TOML literal strings for math delimiters use one backslash, as shown in Installation. Site-wide images intended for a subpath deployment should omit the leading slash. The header now displays your site title.