Skip to main content
On this page

Debug Deca

Deca theme includes a debug system that helps you understand your website’s structure, navigation, and content organization. This debug information is especially useful when configuring sidebars and troubleshooting layout issues.

Enabling Debug Mode

To enable the debug sidebar, you need to set the HUGO_DEBUG_SIDEBAR environment variable to true when running Hugo.

# Set environment variable and run Hugo server
export HUGO_DEBUG_SIDEBAR=true
hugo server

Or run in a single command:

HUGO_DEBUG_SIDEBAR=true hugo server
# Set environment variable and run Hugo server
$env:HUGO_DEBUG_SIDEBAR="true"
hugo server

Or run in a single command:

$env:HUGO_DEBUG_SIDEBAR="true"; hugo server
# Set environment variable and run Hugo server
set HUGO_DEBUG_SIDEBAR=true
hugo server

Or run in a single command:

set HUGO_DEBUG_SIDEBAR=true && hugo server

Understanding the Debug Output

The debug panel shows which sidebar configuration is active for the current page. This helps you verify that the correct sidebar is being applied based on your config.toml settings.

The Previous/Next links show you how pages are connected in the sidebar navigation, which is crucial for understanding user flow through your documentation.

Content Organization

The flat and tree structures help you visualize how your content is organized and whether the hierarchy matches your expectations.

Troubleshooting Common Issues

If your sidebar isn’t displaying correctly:

  1. Check that the page is in the correct section
  2. Verify the sidebar configuration in your config file

If pages appear in the wrong order:

  1. Check the weight parameter in front matter
  2. Verify file naming conventions
  3. Review the flat structure in debug mode

Missing Pages

If pages don’t appear in the sidebar:

  1. Confirm the page is published (draft: false)
  2. Check that the page is in the correct content directory
  3. Verify the sidebar section configuration

Disabling Debug Mode

To disable debug mode, simply remove or set the environment variable to false:

# Remove the environment variable
unset HUGO_DEBUG_SIDEBAR

# Or set it to false
export HUGO_DEBUG_SIDEBAR=false
hugo server
# Remove the environment variable
Remove-Item Env:HUGO_DEBUG_SIDEBAR

# Or set it to false
$env:HUGO_DEBUG_SIDEBAR="false"
hugo server
# Set it to false
set HUGO_DEBUG_SIDEBAR=false
hugo server