Skip to content

Latest commit

 

History

History
57 lines (38 loc) · 1.32 KB

File metadata and controls

57 lines (38 loc) · 1.32 KB

Hugo Module – Debug

Note

As of March 20, 2026, an open Chromium bug prevents child groups from being hidden when the parent group is collapsed. To view the correct hierarchy, expand the ancestor groups of any visible descendant group.

This Hugo module displays debug information in the browser console including:

  • Output from the available Page methods
  • Output from the available Site methods
  • Page parameters
  • Site parameters
  • Miscellaneous information

For example:

screen capture

Requires Hugo v0.158.0 or later.

Configuration

To add this module to your project, initialize your project as a Hugo module:

hugo mod init foo

In the above, foo is typically something like github.com/user/project.

Then add this to your site configuration:

[[module.imports]]
path = 'github.com/jmooring/hugo-module-debug'

Usage

Place this template code within the head element of your base template:

{{ if hugo.IsDevelopment }}
  {{ partial "debug.html" . }}
{{ end }}

Then run hugo server and view the browser console.

Try it

git clone --single-branch -b hugo-forum-topic-7660 https://github.com/jmooring/hugo-testing hugo-forum-topic-7660
cd hugo-forum-topic-7660
hugo server