This section is under development.
Version imprimable multipages. Cliquer ici pour imprimer.
About the project
- 1: ReadMe
- 2: Changelog
- 3: Maintainer notes
1 - ReadMe
Docsy
Docsy is a Hugo theme for technical documentation sets, providing simple navigation, site structure, and more.
This is not an officially supported Google product. This project is actively being maintained.
The main branch is under development and not officially supported; use
official Docsy releases. For full support details, see Official support
limits.
Prerequisites
The following are basic prerequisites for using Docsy in your site:
Install a recent release of the Hugo “extended” version. If you install from the Hugo release page, make sure you download the
extendedversion, which supports SCSS.Install
PostCSSso that the site build can create the final CSS assets. You can install it locally by running the following commands from the root directory of your project:npm install --save-dev autoprefixer npm install --save-dev postcss-cliStarting in version 8 of
postcss-cli, you must also separately installpostcss:npm install -D postcss
Any additional prerequisites depend on the installation option you choose. We recommend using Docsy as a Hugo module, which requires that you have the Go language installed in addition to Hugo and PostCSS.
For complete prerequisites and instructions, see our Get started guides.
Example and usage
You can find an example project that uses Docsy in the Docsy Example Project repo.The Docsy Example Project is hosted at example.docsy.dev. For real-life examples of sites that use Docsy (and their source repos), see our Examples and templates page.
To use the Docsy theme for your own site:
(Recommended) Use the example project, which includes the Docsy theme as a Hugo module, as a template to create your project. You can customize this pre-configured basic site into your own Docsy themed site. Learn more…
Add Docsy to your existing Hugo site. You can add Docsy as an NPM package, as a Hugo module, as a Git submodule, or clone the Docsy theme into your project.
See the Get started guides for details about the various usage options.
Documentation
Docsy has its own user guide (using Docsy, of course!) with lots more information about using the theme. It is hosted by Netlify at docsy.dev.
Maintainers: you can access deploy logs, the deploy preview of
main, and more from the Deploys section of the site’s
Netlify dashboard.
Alternatively you can use Hugo to generate and serve a local copy of the guide (also useful for testing local theme changes), making sure you have installed all the prerequisites listed above:
git clone --depth 1 https://github.com/google/docsy.git
cd docsy
npm install
npm run serve
Contributing
For details on our code of conduct and the process for submitting pull requests, see CONTRIBUTING.md. Thank you to all past, present, and future contributors!
License
This project is licensed under the Apache License 2.0, see LICENSE for details.
2 - Changelog
We document breaking changes and release highlights in this page, with maintainer-facing changes summarized at the end of each release section. For the full list of changes of any particular release, see the release notes.
Useful links: Releases & tags, jump to the latest release, and view the milestones.
Style guide
- Use past tense when when describing releases.
- Generally, start each change entry with a verb (in the past tense). For example: Added, Changed, Deprecated, Fixed.
- It’s ok to follow that with “you can now…”. For example:
Feature abc: you can now…".
- For additional guidance, see Keep a Changelog1.
Definitions
Definitions...
Public customization surface
As a Hugo theme, Docsy exposes various features that client projects may rely on, such as:
- Layouts
- Styles
- Configuration options
- Runtime behavior
Aspects of these features are part of Docsy’s public contract, which we also refer to as the public customization surface. We refer to such feature aspects as public for short.
Because Docsy follows semantic versioning, we will not introduce breaking changes to the public customization surface outside of major version releases.2
Private/internal features
Aspects outside the public customization surface are considered private and internal features and implementation details.
Experimental features
Experimental features are not part of the public customization surface and may change or be removed in future releases.
We release experimental features so that projects can try them out and share feedback.
Breaking change
A breaking change is a backward-incompatible change to Docsy’s public contract that requires client projects to update their configuration, content, or customizations in order to:
- Build successfully (without errors), or
- Preserve existing, significant site functionality or user experience, including visual design
See semver.
A new build warning alone is not considered a breaking change, but it may indicate a future breaking change, such as signaling a deprecation.
Official support
Docsy is maintained with very limited resources and only supports the latest releases of Docsy, its dependencies & tools, and operating systems.
Specifically, the Docsy team officially supports the following:
Production use: the latest official release of Docsy — a stable semver version from the following sources:
- @docsy/theme npm package (
X.Y.Z) - Hugo module (
vX.Y.Z) - GitHub release or git tag (
vX.Y.Z)
npm installs of Docsy from GitHub (
google/docsy) are for development and testing only, not production use.- @docsy/theme npm package (
Issue reports: over the latest official release, a current pre-release, or the
mainbranch.The tool versions as specified for the Docsy release you are using:
- Hugo:
- The version pinned as
hugo-extendedin docsy.dev/package.json (0.164.0) - Older versions, down to Docsy’s declared minimum Hugo version, usually work.
- The version pinned as
- Node.js: versions matching
engines.nodein package.json
- Hugo:
Operating systems: macOS (latest minor release) and Linux.
Everything else — including Windows — is supported on a best-effort basis.
Bug fixes
We define a bug as undesirable behavior documented through an issue. Classify bug-fix commits or pull requests (PRs) under Fixed or Other changes, unless they extend beyond a fix and affect user-facing functionality. In that case, classify them as a Breaking change or New functionality, depending on scope. Prefer narrow, focused PRs where possible.
v0.16.1 or v0.17.0 - UNRELEASED
UNRELEASED: this planned version is still under development
For the full list of changes, see the 0.16.1 or 0.17.0 release page.
- …
New:
- …
Other changes:
- …
- …
v0.16.0
For an introduction to this release, see the 0.16.0 release report. For Hugo-specific notes, see the Hugo 0.158+ upgrade guide. For the full list of changes, see the 0.16.0 release page or the git history since 0.15.0.
New:
- Docsy on the npm registry: published the theme
as
@docsy/theme; npm installs from GitHub (google/docsy) are now for development and testing only. See Docsy as an NPM package (#2683). - Favicon discovery: added automatic discovery and
linking of conventionally named favicon files from
static/, and agen-faviconshelper that generates raster icons from a source SVG. See Add your favicons (#2357).
- Default favicons removed from the theme; sites supply their own (see Favicon discovery above) (#2595).
- Raised the theme’s minimum supported Hugo version to 0.160.1 (was 0.146.0). For the rationale, see the 0.16.0 release report (#2668).
- Theme folder move: the canonical theme now
lives in
theme/; install paths change for every install mode (#2617). - Bootstrap and Font Awesome via npm: declared them as npm dependencies instead of importing them as Hugo modules; applies to Hugo-module installs only (#2668).
Other changes:
- Migrated the theme and docs off deprecated Hugo language APIs (#2593). Thanks @deining for the groundwork in #2594 and #2578!
- Synced and corrected the Russian UI strings. Thanks @shurup!
- Upgraded the project’s Hugo build to 0.164.0. See Hugo 0.158+ upgrade guide (#2581).
- PostCSS is opt-in for non-RTL sites: sites without RTL languages or their own PostCSS config no longer need a PostCSS toolchain (#2668).
- Moved cached-sidebar activation on large sites from inline jQuery into the
shared
chrome-nav.js, which now loads on every page; rendered navigation is unchanged. See the 0.16.0 release report.
- Added a
sharedchrome build mode (td.chrome) that renders the repeated chrome (navbar, footer, left-nav) once per locale, for much cheaper link checking of large sites (#2659).
For maintainers:
- Reorganized the repository package boundary:
theme/package.jsonowns theme runtime dependencies, and the root package orchestrates thedocsy.devandthemeworkspaces (#2617). - Added build and test guards (Hugo deprecation output, fixture-site regressions) and moved link checking from htmltest to Lychee. See 0.16.0 release report.
v0.15.0
For an introduction to this release, see the 0.15.0 release report. For the full list of changes, see the 0.15.0 release page.
New:
- Agent support
(experimental): added Markdown alternate outputs, “View
Markdown” links, and
llms.txt(#2597, #2601, #2605, #2606 - Doc-rooted sites (experimental): added a documented pattern and example variant for documentation-first sites (#2563, #2587).
- Version menu entries: added support for headings, separators, per-entry page-link behavior, and kind-specific styling (#2557, #2586).
cardshortcode rendering: changed Markdown rendering in card arguments to use the including page’s context, enabling relative Markdown link paths and more flexible render-hook behavior. Details (#2565).- Added optional
relattribute values for footerparams.links(#2576); see Community and footer links.
- Community and footer link paths changed for multilingual sites; see blog (#2580).
- Version menu markup and mobile visibility changed for sites using
params.versions; see Version menu entries (#2557, #2586). cardshortcode rendering changed for Markdown arguments; breakage risk is low. See blog.
Other changes:
- Internationalization: added and updated translations.
- Fixed community/footer links so site-local links no longer open in a new browser target (#2133, #2576).
v0.14.3
Patch release 0.14.3 applies the layout fix for #2561, which ensures
.td-main > .row grows vertically (#2569).
v0.14.2
Key fix for this patch: Apply .td-main flex only when sidebar exists
(#2546).
For the full list of changes, see the release report and 0.14.2 release page.
Breaking changes (style-only):
- Default code styles changed from
tango/onedarktofriendly/nativefor sites usingtd/code-dark(#2548).
New:
- Console block content selection: selection and copy-code now only includes commands, not output (#2548).
Other changes:
- Added
nameattribute to search form field for better semantics and autofill (#2549). - Package version build metadata and footer icon tweaks (#2547).
v0.14.1
Patch release 0.14.1: fixed ToC sidebar width in xl viewports (#2538).
v0.14.0
Resources:
- Release 0.14.0 report and upgrade guide
- 0.14.0 release page for the full list of changes
- Navbar styling changed to a light-theme default (previously dark) and is now configurable. See Navbar style improvements (#2477).
blocks/covershortcode content processing changed (#939, #2480).- Heading aliases/in-page targets: anchor target class renamed
(
td-offset-anchor→td-anchor-no-extra-offset), see Heading aliases. - Swagger UI style customization changed.
- Hugo 0.153+ upgrade introduced breaking changes (#2431).
New:
- Markdown alert syntax: added support for Hugo’s Markdown alert syntax (#2443).
td/site-build-info/netlifyshortcode (experimental), see Shortcodes (#2444).td-below-navbarhelper class forblocks/coverpositioning (#2480).
Other changes:
- Fixed navbar color contrast (#2413) via #2477.
- Style tweaks:
<details>spacing, TOC h1 weight, see Style improvements and fixes. - Fixed fragment link scrolling by using
scroll-padding-top, see Heading aliases. - Internal SCSS file reorganization: moved internal SCSS files to
assets/scss/td/(#1654) for improved separation of project and internal SCSS files. - Internationalization: updated translations for multiple locales.
- Fixed nested
sidebar_root_forbug (#2470). - Fixed Google-search modal colors in dark mode (#2524).
- RTL: fixes for code blocks and foldable-nav icons (#2533).
v0.13.0
Resources:
- Release 0.13.0 report and upgrade guide
- 0.13.0 release page for the full list of changes
- Language menu: changed visibility, see Language menu visibility (#2303).
- Alert shortcode: Markdown content processing changed, see Alert shortcode improvements (#941).
New:
- Active TOC entry tracking using Bootstrap ScrollSpy (#2366).
- Section sidebar root feature (#2364).
Other changes:
- Improved accessibility: color contrast and typography (#2285).
- Dark mode fixes and improvements:
- Flash Of Unstyled Content (FOUC) (#2332).
- Improved TOC entry color contrast in dark mode (#2376, #2379).
- Mobile navbar: added scroll indicators for overflow navigation (#2406).
- Better NPM support: resolved optional and peer dependency issues (#2115). See breaking changes in the blog post.
- Dependency updates: Bootstrap 5.3.8, Hugo 0.152.2, Node LTS ≥24.
- Updated translations: added Occitan locale (#2173) and refreshed Simplified Chinese (#2313) and Ukrainian (#2331).
- TOC visibility control: documented the
notocpage parameter (available since 2016) for hiding the table of contents on specific pages (#2405). - Build-time rendering of mathematical and chemical formulae: now uses Hugo’s embedded KaTeX engine (#2276, #2394, #2395). For details, see LaTeX support with KaTeX.
- Dark mode. Added support for:
- Google search integration (#2387).
- Sample support for color-contrast adjustments: for details, see How to pick colors with good color-contrast (#2384).
- Added
_paramshortcode with support for parameter substitution (#2371).
v0.12.0
For the full list of changes, see the 0.12.0 release page.
- Renamed the default Docsy heading render hook and heading self-link partials. This is a breaking change only if your project uses this feature. For details, see Heading self links (#2223).
- Relocated and adapted layouts in response to Hugo’s new template system. For details, see Adapt to new template system in Hugo v0.146.0 #2243.
- IMPORTANT: if your project overrides any of the layout files mentioned in #2243, then apply the same name changes in your project files. In particular, note that:
Potential breaking changes:
- Removed shortcode
figure, hugo’s built-in shortcodefigurecan/will be used instead.
New:
- Enhanced and adjusted Breadcrumb navigation support:
- Added
ui.breadcrumb_disableconfiguration parameter to disable breadcrumbs for an entire project, individual pages, or section. For details, see Breadcrumb navigation. - Blog pages now also have breadcrumbs by default (#1788).
- Index-page single-element breadcrumb lists are hidden by default (#2160).
- Added
- Added support for a _td-content-after-header.html page-content render hook, which can be content type specific (#2192). For details, see the User Guide.
Other changes:
- Blog section index page content and title were ignored, they are now
displayed (#1787). To recover the old behavior use the following style
override:
.td-section.td-blog .td-content { display: none; }. - Adds a
commentshortcode, as a drop-in replacement for the one removed from Hugo’s built-in shortcode.
v0.11.0
For the full list of changes, see the 0.11.0 release page.
New:
- Support for Right-To-Left (RTL) languages is reintroduced via Bootstrap’s support for RTL. For details, see Right-to-left languages.
- The URL to your project’s contribution guidelines is configurable. For details, see Adding a community page.
- When a section’s sidebar entries are truncated because there are more than params.ui.sidebar_menu_truncate section entries, a warning is issued.
v0.10.0
For an introduction to this release, see the 0.10.0 release report. For the full list of changes, see the 0.10.0 release page.
New: color themes and dark-mode support! For details, see Color themes and dark-mode support.
Breaking changes:
- Removed shortcode
card-codethat was deprecated in 0.7.0; use shortcodecardwith named parametercode=trueinstead. - The following SCSS variables are inlined in favor of dark-mode compatible
styling:
$border-color,$td-sidebar-tree-root-color,$td-sidebar-bg-color,$td-sidebar-border-color(#1952)
Style changes (potentially breaking):
- Adjusted the style of various shortcodes and elements so that they are compatible with light/dark mode. For details, see Important style changes in Color themes and dark-mode support.
v0.9.1
Patch release. For details, see 0.9.1.
v0.9.0
For an introduction and commentary, see the 0.9.0 release report. For the full list of commits, see the 0.9.0 release page. The most significant changes of this release are listed next.
Breaking changes:
Repository Links now work for multi-language sites (#1744).
For any given page, repository links are now computed from a page’s resolved
Filepath — as resolved through mount points, if any. That is, the path used is the one that refers to the file’s actual location on disk, not its logical path in Hugo’s union file system.This is a breaking change for pages of sites that use mounts and path_base_for_github_subdir. Projects will need to adjust the value of path_base_for_github_subdir to be relative to the file’s physical location.
Class names to disable repository links were misnamed with a suffix of the form
--KIND. The new suffix is__KIND. For details, see Disabling links.Heading self-link support has been reimplemented and projects must now explicitly enable the feature. For details, see Heading self links.
Footer changes: refactoring, for easier customization, and simplification. For details concerning all footer changes, see #1818.
- Footer layout factored into parts: left, right, and center, with copyright a subpart of center. For details see Footer layout
- Footer copyright, supports date-range, and site copyright fallback. For details, see Footer copyright.
- Footer streamlined: the About-page footer link and All-rights-reserved text are now hidden by default. For details, see Footer streamlined.
Other changes:
- The latest release of Mermaid resources are now fetched at build time (#1410).
- Look and feel updates.
v0.8.0
For the full list of changes, see the 0.8.0 release page.
Breaking changes:
- Docsy is packaged as a single Hugo module (#1120). For details, see Use Docsy as a Hugo Module.
- Important: for non-Hugo-module projects, running
npm installin the Docsy theme directory now creates agithub.comsibling folder (via Docsy’spostinstallscript). For guidance on the Hugo-reported “failed to load modules” error, see #2116. - Page feedback, or User feedback:
- In support of projects configuring analytics outside of Docsy, feedback
functionality is enabled regardless of whether
site.Config.Services.GoogleAnalytics.IDis set (#1727). - Feedback-event attribute changes (#1726):
- Event
nameispage_helpfulrather thanclick - Event
valuefor “yes” is 100 by default, rather than 1, allowing for more response options in the future. To override the default setparams.ui.feedback.max_value.
- Event
- In support of projects configuring analytics outside of Docsy, feedback
functionality is enabled regardless of whether
- SCSS:
@function prepend()and fileassets/scss/support/_functions.scsshave been dropped. Instead use the more general SASS/SCSS listjoin()function (#1385).
v0.7.2
For the full list of changes, see the 0.7.2 release page. We mention some noteworthy changes here:
- Algolia
- #1651 DocSearch fixed for mobile and for sites with two search boxes (in the top and left navs).
- #1662 DocSearch is supported by Docsy through site config.
- For details, see Algolia DocSearch.
- Tabbed panes:
persistLangis deprecated, usepersistinstead- Persistence is enabled by default (independent of the old
persistLangparameter value) ; to disable usepersist=disabled - Various fixes and enhancements, with more to come; for details, see #1641 and Tabbed panes.
- Left-nav, and right-nav (TOC + page meta): spacing issues have been resolved; for details, see #1661.
v0.7.1
For the full list of changes, see the 0.7.1 release page.
Followup changes to Bootstrap (BS) 5.2 upgrade (#470):
td-blog-posts-list__itemandtd-blog-posts-list__bodyreplace the.mediaand.media-bodyclasses, dropped by BS 5 #1560.- Docsy test for Bootstrap version has been made more robust, and can be disabled. For details, see #1579.
v0.7.0
For the full list of changes, see the 0.7.0 release page.
New:
- Click to copy button for Chroma-highlighted code blocks: If you already implemented this functionality on your website, you can disable it. For details see Chroma highlighting docs.
Breaking changes:
- Hugo release 0.110.0 or later is required.
- Upgraded Bootstrap (#470) to v5.2. For a list of Bootstrap’s breaking changes, see the Bootstrap migration page. Docsy-specific changes:
- Shortcodes:
- Now using Hugo’s native support for processing HTML & markdown, not file extension testing. (#906)
- Dropped support for pre-Hugo-0.54.x behavior of shortcodes with
markdown,
{{%...%}}. (#939) blocks/section: default and accepted values of thetypeargument have changed! For details, see blocks/section (#1472).- Card shortcodes (#1376)]:
- Renamed CSS class
td-card-decktotd-card-group. card,card-code: markup of inner content (HTML/markdown) now depends on the syntax of the calling shortcode, not on extension of page file any more #906.card-codeis deprecated; usecardwith named parametercode=trueinstead.
- Renamed CSS class
- Detection of draw.io diagrams is now disabled by default #1185
Other changes:
$list-inline-paddingis increased in support of footer icons (#1523). If this global adjustment is a problem for your project, let us know and we can contextualize the adjustment to the footer.- Non-breaking changes that result from the Bootstrap v5 upgrade:
- Draw.io diagram edit button: replaced custom colors by BS’s outline primary.
v0.6.0
For the full list of changes, see the 0.6.0 release page.
With this release we declare a feature freeze while we migrate to the newest Bootstrap version. See the announcement for more information.
New:
Simplified use of mermaid diagrams: when using a
mermaidcode block on your page, mermaid is now automatically enabled (needs hugo version >= 0.93.0). For existing sites built with hugo 0.93.0+, parametermermaid.enablecan be removed from site config.Add render hook for chem code blocks: add auto-activation of
mathandchemblocks via KaTeX and mhchem. Support for formula rendering activation on individual pages only. Hugo version >= 0.93.0 required.
v0.5.1
For the full list of changes, see the 0.5.1 release page. BREAKING CHANGES are documented below.
After you update your project’s Docsy:
- Update your project setup (see 0.4.0) if you haven’t already.
- Run
npm install.
New:
- Projects can now install and use Docsy as an NPM package.
Breaking changes:
- Tabbed panes, text display. By default, the content of a tab inside a
tabbed pane is shown as code. As of version 0.4 of the shortcode, you can add
the parameter
code=falseto yourtabpaneortabshortcode in order to render tab content(s) as text (markdown or html). As of version 0.5 the name of this parameter was changed, we now usetext=truein order to mark content as text. - Display logo by default. Most projects show their logo in the navbar. In support of this majority, Docsy now displays a logo by default. For details on how to hide the logo (or your brand name), see Styling your project logo and name.
- Upgraded Bootstrap to v4.6.2 from v4.6.1, resulting in some style changes
(such as an adjustment in the size of
small). For details, see v4.6.2 release page. - Upgraded FontAwesome to v6 from v5. While many icons were renamed, the v5 names still work. For details about icon renames and more, see What’s changed in v6.
- Search-box: the HTML structure and class names have changed, due to the Font Awesome upgrade, for both online and offline search. This may affect your project if you have overridden search styling or scripts.
Other changes:
- By default, Docsy now uses the gtag.js analytics library for all site tags. For details, see Adding Analytics > Setup.
v0.5.0
Unpublished.
v0.4.0
For the full list of changes, see the 0.4.0 release page. Potential BREAKING CHANGES are documented below.
After you update your project’s Docsy, run npm install.
Update your project setup:
If your project uses Docsy as follows:
- Hugo Module, then this change doesn’t impact you.
- For other Docsy setups, this is a BREAKING CHANGE – read on.
Docsy now fetches Bootstrap and FontAwesome as NPM packages rather than git submodules. This has an impact on your project-build setup. To migrate your site, follow these steps (execute commands from your project’s root directory):
- Delete obsolete Docsy Git submodules:These commands remove the submodules from Git’s tracking, from the
git rm themes/docsy/assets/vendor/Font-Awesome git rm themes/docsy/assets/vendor/bootstrap.gitmodulesfile, and deletes the submodule files underthemes/docsy/assets/vendor. - Get Docsy dependencies:
(cd themes/docsy && npm install) - Update your build scripts to fetch Docsy dependencies automatically. For
example, if your site build uses NPM scripts, consider getting Docsy
dependencies via a prepare script as follows:
{ "name": "my-website", "scripts": { "prepare": "cd themes/docsy && npm install", "...": "..." }, "...": "..." } - (Optional) Build script cleanup. If your project uses Docsy as a git
submodule, Docsy updates no longer require the
--recursiveflag when runninggit submodule update. Consider dropping the flag if you have no other recursive git submodules.
Proceed as usual to build or serve your site.
v0.3.0
For the full list of changes, see the 0.3.0 release page.
Breaking changes:
- Upgrade to Algolia DocSearch v3. If your site uses the deprecated DocSearch v2, you must update your DocSearch code.
- (Edit) #1009 inadvertently changed the base Bootstrap styles for
cards, as well as the Docsy
highlightstyle. For details, see issue #1154. Release 0.5.1 includes a fix.
v0.2.0
For the full list of changes, see the 0.2.0 release page.
New:
Add official Docsy support for Hugo modules. Many thanks to the dedicated and patient efforts of @deining, who researched, experimented, and implemented this feature. Thanks to @deining and @LisaFC for the doc updates.
For details, see Migrate to Hugo Modules.
3 - Maintainer notes
For our main contributing page covering license agreements, code of conduct and more, see Contributing. This page is for maintainers only.
Content placement
Keep project content DRY by writing each fact in the artifact whose purpose and audience it serves. Each artifact links to the more detailed ones rather than restating them:
- Changelog: a lean record of what changed, for developers who want a quick overview. No upgrade advice, implementation detail, or background. Entries link to the release report for details and cite a change’s key issues — PRs only when there is no key issue, such as for contributor credit. Maintainer-facing changes get a short For maintainers list at the end of the release section.
- Release and upgrade blog posts: what’s new, what to watch out for, and actionable upgrade guidance — the historical narrative. Link to the site docs for current behavior and reference detail. Don’t enumerate PRs and issues; link an open tracker only where it adds follow-up context. Upgrades are a chore, so keep posts maximally actionable yet lean: the release summary reads like a selective table of contents — a link per section with a clause of guiding glue — and each fact appears in one section, its home. Maintainer-facing changes are summarized in a For maintainers section at the end of the documented changes.
- Site docs (
docs/): Docsy as it is now. Minimal historical references or links to issues and PRs. - Release notes and milestones: the exhaustive record — generated release notes list every PR, PRs link their motivating issues, and the release milestone gathers the issues resolved. Authored artifacts link to these rather than reproducing the enumeration.
- Test and code comments: implementation rationale and regression background.
PR descriptions
Generally speaking, a PR opening comment should be a Markdown list that explains the “why” behind the changes, and at a very high level what was changed. Start each item with a verb in the present tense, 3rd person singular.
PR authors are encouraged to flag the scope of changes when a PR touches Docsy’s public customization surface – especially for breaking changes – to help reviewers and release-time audits. For example:
- Scope: breaking (removal), user-facing (new)
Suggested scope labels (use one or more):
- breaking, user-facing, internal-only, docs-only.
Optionally qualify with kinds in parentheses, mapping to release-blog and changelog sections: new, change, fix, removal, deprecation.
The release-time audit (see Release-prep audit) is the source of truth for what gets documented; PR-level scope labels are a hint, not a substitute.
Hugo versions
The repo tracks two distinct Hugo versions, as documented below. Their declarations, synchronization requirements, and relative-version constraints are guarded by test:hugo-versions.
Only current-state pages — docs and the changelog’s
official support section — render
these versions live, via the hugoMinVersion site param and the hugo-version
shortcode. Blog posts are historical snapshots and render versions
time-insensitively: a post that renders one of these version params freezes it
in its front matter, so updating the post (say, for a patch release) means
editing one field. (Version literals in narrative text are already
time-insensitive.) Page params take precedence over site params, so the same
{{% param hugoMinVersion %}} call is frozen in a post and live in docs.
Guarded by test:hugo-versions.
Minimum Hugo version
Docsy declares the minimum Hugo version required to support the features that Docsy provides and to cover important security fixes.
This version is declared in three places that must agree:
- theme/hugo.yaml
module.hugoVersion.min(canonical source) - theme/theme.toml
min_version - docsy.dev/config/_default/hugo.yaml
params.hugoMinVersion, which feeds the requirement statements in user-facing docs (via{{% param hugoMinVersion %}}) and, through the&hugoMinVersionanchor, docsy.dev’s ownmodule.hugoVersion.min.
theme.toml is Hugo’s legacy theme descriptor: its min_version is read only
as a fallback when the module config sets none, and the file’s sole remaining
external consumer is the themes showcase, which ingests it from the theme’s
git repo. Hence the npm package omits it (theme/package.json files).
Raising the minimum is a breaking change for theme users, only done to support new features or security fixes. To validate that a Docsy site actually builds with Hugo pinned to the declared minimum, run test:smoke.
Officially supported Hugo version
The Hugo version that Docsy officially supports is pinned as the
hugo-extended dev dependency in docsy.dev/package.json.
This version is generally kept in sync with the latest Hugo release; to update it, run:
npm -C docsy.dev run update:hugofor the latestnpm -C docsy.dev install -DE hugo-extended@X.Y.Zfor a specific version
Docs render this version live through the hugo-version shortcode
(hugo.Version): docsy.dev builds always run the pinned Hugo.
Test suites
From the repo root:
| Script | Role |
|---|---|
test:fixture-site | Fast, offline checks over minimal monolingual fixture sites — paths docsy.dev can’t cover |
test:hugo-versions | Fast, offline checks of the Hugo versions declarations and constraints |
test:smoke | Slow, network-bound; builds a site from GitHub several ways (NPM, Hugo module, clone, minimum-Hugo) |
test:tooling | Unit tests for repo scripts |
test:website | Full docsy.dev checks: format, links, hugo-build, alt-site, md-output, and favicon tests |
All but test:smoke run in CI; smoke tests are run manually for PR-branch
validation (they auto-target the current branch’s GitHub upstream).
The md-output and favicon tests compare built output against committed golden
files. When a golden test reports intended drift, run npm run update:goldens
to rebuild the site and refresh both suites’ goldens, then review the diff and
commit it.
Link checking and the refcache
test:website checks docsy.dev’s links with Lychee, caching external-link
results in the committed docsy.dev/.lycheecache (the “refcache”) so checks
stay fast and offline-friendly. Config lives in docsy.dev/lychee.toml. CI
installs a pinned lychee binary (see .github/workflows/test.yaml); a plain
site build doesn’t need it.
- Refresh after adding or changing external links:
npm run fix:refcachere-runs the check, adding any missing entries and renormalizing — then commit the updated.lycheecache. - Inspect or prune with
npm run refcache(-- -sfor a summary,-- -p 10%to drop the oldest tenth).
Both scripts work from the repo root or docsy.dev/.
Release-prep audit
Before drafting the changelog entry and release blog post, run a careful audit of every PR and raw commit in the release range so nothing user-visible slips through (motivated by the version-menu near-miss during 0.15.0 prep).
For each PR/commit in git log v<prev>..main:
- Inspect the actual diff (not just the title or PR description). Use
gh pr view <num>andgit show <sha>as needed. - Classify the change: breaking, user-facing, internal-only, or docs-only (see definitions in Public customization surface and Breaking change).
- For every breaking or user-facing item, verify it appears in both the changelog and the release blog post — with cross-links to the relevant user-guide sections where applicable.
- Be especially alert to: new/renamed params, partials, shortcodes, layouts, CSS classes, i18n keys, default-behavior shifts, and changes to the version menu, navigation, or other rendered output.
Capture the audit as a working document under tasks/<release>/release-prep/
(see prior releases for examples) so reviewers can sanity-check the
classifications. Treat the audit — not PR-level scope hints — as the source of
truth for what the changelog and release blog must cover.
Publishing a release
These notes are WIP for creating a release from a local copy of the repo. These instructions assume the release is:
- v0.16.1
If not adjust accordingly.
Before creating a release, do a release-prep audit and use it to drive the changelog and release-blog updates in the next two steps.
A release run can span sessions and days. Consider keeping a running copy of the numbered steps below as a checklist in your own notes, ticking steps as they complete and marking who each pending step is waiting on.
Change directory to your local Docsy repo.
Expecting final adjustments as you prepare for the release? Create a branch to work from. For example:
git checkout -b release-v0.16.1-prep # Or you have a local create-branch alias: gcb release-v0.16.1-prepServe the site and continue working through these steps from the served version of these notes.
Create or update a changelog entry for v0.16.1.
- This step is driven by the release-prep audit.
- The section should provide a brief summary of breaking changes using the section template at the end of the file.
- Ensure to remove the UNRELEASED note, if still present.
- You’ll create a new section for the next release in a later step.
Update the release report blog post for v0.16.1, if any.
- Remove draft status.
- Set
date(orlastmodif already published) to today’s date.
Run
npm run fix.Update Docsy version to v0.16.1 using the following from a (bash or zsh) terminal.
First set the
VERSIONvariable; we use it throughout the steps below.VERSION=v0.16.1Then run the
set:versionscript.Docsy is probably already at
v0.16.1-dev, so you can run:npm run set:versionOtherwise, set the version explicitly:
npm run set:version -- --version $VERSIONBoth forms update the
versionrelated fields in package.json and docsy.dev/config files.
Run
npm run ci:test, which runsci:prepareand more to ensure that, e.g., vendor assets and go.mod dependencies are up-to-date, etc.Submit a PR with your changes.
Set the
BASEvariable to the target branch:mainif this is a stable release, andreleasefor patch releases.BASE=main # or release for patch releasesCommit any changes accumulated from the previous steps using this title:
Release v0.16.0 preparationCreate a PR (with version-checks disabled) using the following command that will open a PR-creation page in your browser:
export SKIP_VERSION_CHECK=1 gh pr create --web --title "Release $VERSION preparation" \ --base $BASE \ --body "- Contributes to #<ADD-RELEASE-PREP-ISSUE-HERE>"Use the web interface to fill in the PR details.
Submit the PR.
Test the PR branch:
Run-edit-cycle, after each run sub-step below:
- Push any adjustments to the PR.
- Restart this step 8 from the top, if justified.
Run the smoke tests, which auto-target the PR branch pushed in the previous step and include a build at the minimum Hugo version:
npm run test:smokeTest consumer sites:
- Run the consumer-site test procedure over selected sites listed below.
- Sites to test, ideally covering each install mode:
- Hugo module: docsy-example
- npm package: docsy-starter
- Git submodule: opentelemetry.io or another large production site
Get PR approved and merged.
Pull the PR to get the last changes.
Post-merge check from consumer sites. In each worktree from step 8, update the site’s Docsy pin from the PR branch tip to merged
main, then:- Build and confirm zero warnings; re-run the site’s sanity checks.
- Re-run the full test procedure only if the merge involved a non-trivial conflict or rebase.
Ensure that you’re:
- On the target
$BASEbranch - At the commit that you want to tag as v0.16.0
- On the target
Create the new tag for v0.16.0.
Set the REL variable to the release version or use the
VERSIONvariable if you set it in the previous step.REL=${VERSION:-v0.16.0} REL=v${REL#v} # tags are v-prefixed; normalize to exactly one leading v echo "REL=$REL"Create the new tag.
git tag $RELAlso create the nested theme module tag. Since the theme moved under
theme/, it is its own Go module (github.com/google/docsy/theme), and Go resolves it via a subdirectory-prefixed tag — this is what consuming sites get when they import…/docsy/theme:git tag theme/$RELDouble check:
git tag --sort=-creatordate | head -3
Push the new tags (the release tag
$RELand the theme module tagtheme/$REL): either to all remotes at once, or one at a time.Push to all remotes
List the remotes so you know what you’ll be pushing to:
git remoteCheck that the
push-all-remotesalias is defined, and if not, define it:git config --global --list | grep alias.push-all-remotesDefine a `push-all-remotes` alias
First check if the
push-all-remotesalias is already defined:git config --global --list | grep alias.push-all-remotesIf not, define the alias:
git config --global alias.push-all-remotes \ '!f() { for r in $(git remote); do (set -x; git push "$r" "$1"); done; }; f'NoteYou only need to define the alias once. Omit
--globalfrom the command above to make the alias available only in the current repository rather than all repositories.If you have git hooks enabled that auto-update the Docsy package version, disable the hook check for now:
export SKIP_VERSION_CHECK=1Push the tags to the remotes (the release tag, then the theme module tag):
$ git push-all-remotes $REL + git push origin v0.16.0 * [new tag] v0.16.0 -> v0.16.0 + git push upstream v0.16.0 * [new tag] v0.16.0 -> v0.16.0 ... $ git push-all-remotes theme/$REL ...Sanity check over
upstreamfor example:git ls-remote --tags upstream | grep $RELUnset the SKIP_VERSION_CHECK variable when you’re done:
unset SKIP_VERSION_CHECK
Push to a single remote
- Push to a single remote at a time, such as
upstream:
git push upstream $REL git push upstream theme/$RELSanity check over
upstreamfor example:git ls-remote --tags upstream | grep $REL
Publish the theme package:
- Publish to the npm registry from
theme/at the tagged release commit. - Verify the published version.
- Verify that the
latestandnextdist-tags point at it.
- Publish to the npm registry from
Update the deploy/prod branch from
$BASE.For stable releases from
main, use:git checkout deploy/prod git merge --ff-only main git push-all-remotes deploy/prodFor patch releases from
release, selectively merge fromrelease.The branch update will trigger a production deploy of the website.
Wait for the production deploy to complete and check that docsy.dev has been updated to the new release.
Draft a new release using GitHub web; fill in the fields as follows:
Visit tags to find the new release tag v0.16.0.
Select Create a new release from the v0.16.0 tag dropdown menu
Release title: use the release version.
v0.16.0Click Generate release notes to get the release details inserted into the release notes text area.
Add the following text atop the generated release notes:
## Release summary - [Release 0.16.0 report and upgrade guide][blog] - [Changelog v0.16.0][changelog] entry [blog]: <https://www.docsy.dev/fr/blog/2026/0.16.0/> [changelog]: <https://www.docsy.dev/project/about/changelog/#v0.16.0>Select Create a discussion for this release.
Publish the release: click Publish release.
Test the release with a downstream project and/or the docsy-example site.
If you find issues, determine whether they need to be fixed immediately. If so, get fixes submitted, reviewed and approved. Go back to step 1 to publish a dot release.
Update the
releasebranch once the release is final.For a stable release, fast-forward
releaseto the final release commit frommain:git checkout release git merge --ff-only main git push-all-remotes releaseFor patch releases, the release-prep PR should already target
release, so there is no separatemaintoreleasefast-forward.Update the doc-rooted branch from deploy/prod:
git checkout doc-rooted git merge --ff-only deploy/prod npm run doc-rooted -- build # Optionally take a look at the preview npm run doc-rooted -- serve curl http://localhost:1313/index.md # Push the changes git push-all-remotes doc-rootedIf the fast-forward merge fails, stop and reconcile the branch history. Once pushed, wait for the Netlify deploy and check the doc-rooted preview.
Update, create, or close GitHub milestones as appropriate.
If all is well, release the Docsy example as detailed next.
Docsy example release
The steps you follow are similar to the ones above for the Docsy release, but with the following modifications:
Update the version of the example to v0.16.1-dev:
VERSION=v0.16.1-dev npm run set:version:example -- --version $VERSIONPerform step 6 onwards as above to test, create a PR, create a release and publish it with one difference:
- Once the deploy/prod branch has been updated, wait for the production deploy to complete and check that example.docsy.dev has been updated to the new release.
- To create a new release draft, visit Docsy-example release draft.
Update the Examples page Docsy version in the Starter templates table to v0.16.1.
Post Docsy-release followup
Assuming that both the Docsy and Docsy-example releases v0.16.1-dev
have been successfully deployed, and that at least one other project has been
successfully tested with the new release, then perform the following actions
before any further changes are merged into the main branch:
Update the package version to a dev ID for Docsy and Docsy-example:
$ npm run -s set:version:git-info ✓ Updated package.json version: 0.14.3 → 0.14.3-dev+003-over-main-cf4f514b ✓ Updated docsy.dev/config/_default/params.yaml version: 0.14.3 → 0.14.3-dev ✓ Updated docsy.dev/config/_default/params.yaml tdBuildId: (none) → 003-over-main-cf4f514b ... $ npm run -s set:version:example:git-info ...Retire temporary measures that the shipped release makes obsolete, verifying checks as you go.
Remove any temporary ignore rules from
docsy.dev/lychee.tomland confirm that the link check passes.Search for other release-scoped markers and act on those now that the release is shipped, for example:
git grep -En 'Remove after|TODO\(0\.' -- ':(exclude)*public*'Leave markers naming a later release in place.
In the Changelog:
Create a new entry for the next release by copying the ENTRY TEMPLATE at the end of the file.
Fix the new release URL, which ends with
latest?FIXME=..., so that it refers to the actual release, now that it exists.
Submit a PR with your changes, using a title like:
Set version to v0.16.1-devGet PR approved and merged.
Consumer-site test procedure
To test a Docsy branch or release from a consumer site, for each site:
Create a dedicated worktree + branch off the site’s default branch; keep it for the site’s post-release Docsy-update PR.
Point the site at the target Docsy commit, per install mode:
Hugo module: map the theme module to the local checkout – env-only, no repo edits:
export HUGO_MODULE_REPLACEMENTS="github.com/google/docsy/theme -> DOCSY_CHECKOUT_PATH/theme"npm package:
npm install -D file:DOCSY_CHECKOUT_PATHfor sites that npm install from GitHub (google/docsy); append/themefor sites that use the registry package (@docsy/theme).Git submodule:
cd themes/docsy git fetch FORK BRANCH-NAME git checkout FETCH_HEAD cd ../.. && git add themes/docsy # stage so prebuild targets this SHA
Apply the release post’s upgrade actions – all of them, before the first build: check every applies-if guard against the site, including the companion Hugo guide’s actions when the release raises the Hugo minimum. This doubles as a dry run of the post; report any gap or inaccuracy as feedback on it.
For Hugo-module sites, confirm that the replacement is live once the import path targets the theme module:
hugo mod graph | grep 'github.com/google/docsy/theme'
Build: confirm zero errors and warnings.
Run the site’s test suite:
- Run
npm testor the site’s canonical test script. - Confirm that all checks pass.
- Run the release post’s sanity checks.
- Run
Spot-check key pages and output files, in the build output or a served preview:
- Pages – confirm each renders with intact chrome, styles, and favicons:
- Home page – also confirm that the
generatormeta element reports the expected Hugo version (Docsy’s version isn’t emitted) - Docs landing page, and a random docs page
- Blog landing page and a random blog post, when the site has a blog
- Some other random page
- The 404 page
- Home page – also confirm that the
- Other output files – confirm each looks sane:
- The main CSS and JS files
- When the site enables LLMS support:
llms.txt, and the.mdoutput of the pages above _redirects, when presentsitemap.xml– note that some sites normalize it after the build
- Pages – confirm each renders with intact chrome, styles, and favicons:
A/B diff the generated site:
If the site’s
public/folder is a git repository (a setup worth adopting; see docsy.dev’smake:publicnpm script), build at the current (pre-update) pin and commit the output as the baseline.git diffthen reports the changes directly. Do not removepublic/if it’s a symlink to a different directory.Otherwise, build at the current pin, set
public/aside as a baseline directory, rebuild at the new pin, and diff, for example:diff -rq --exclude='*.map' BASELINE_DIR/ public/Confirm at least one difference exists.
Assess each difference:
- Map it to an announced change, or flag it as a potential regression.
- Investigate issues and report their root causes.
Report the results.
Release helper scripts
- NPM scripts:
set:versionandset:version:*;update:hugo(see Hugo versions) scripts/get-build-id.sh: BuildsX.Y.Z-dev+…-over-main-…from the latest semver tag onmain, commit offset, and tip SHA; ifpackage.json’s X.Y.Z core is already greater than that git-derived core, keeps the higher core (release prep ahead of tagging).scripts/set-package-version/index.mjs: Low-level version manager. See script help for usage.