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
Sidebar Configuration
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.
Page Navigation
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
Sidebar Not Showing
If your sidebar isn’t displaying correctly:
- Check that the page is in the correct section
- Verify the sidebar configuration in your config file
Navigation Order Issues
If pages appear in the wrong order:
- Check the
weightparameter in front matter - Verify file naming conventions
- Review the flat structure in debug mode
Missing Pages
If pages don’t appear in the sidebar:
- Confirm the page is published (
draft: false) - Check that the page is in the correct content directory
- 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