doctor
Diagnose configuration and content issues in your Hwaro site.
hwaro doctor
# Check only a specific content directory
hwaro doctor -c posts
# Auto-fix: add missing config sections
hwaro doctor --fix
# Auto-fix with minimal sections (skip pwa, amp, assets, etc.)
hwaro doctor --fix --minimal
# Output result as JSON
hwaro doctor --json
hwaro tool doctoralso works as a backward-compatible alias.
Options
| Flag | Description |
|---|---|
| -c, --content DIR | Content directory to check |
| --fix | Auto-fix issues (add missing config sections) |
| --minimal | With --fix, skip advanced optional sections (pwa, amp, assets, deployment, image_processing, etc.) |
| -j, --json | Output result as JSON |
| -h, --help | Show help |
What It Checks
Config diagnostics:
base_urlis not setbase_urldoesn't start withhttp://orhttps://base_urlhas a trailing slashtitleis still the default valuefeeds.enabledis true butfeeds.filenameis emptysitemap.changefreqhas an invalid valuesitemap.priorityis out of range (0.0–1.0)- Duplicate taxonomy names
- Duplicate language codes
- Invalid
search.formatvalue
Template diagnostics:
- Templates directory not found
- Required templates missing (
page.html,section.html) - Unclosed block tags (
if,for,block,macrowithout matchingend) - Mismatched
{{ }}variable tags
Content diagnostics:
- Missing
titlein frontmatter - Missing
descriptionin frontmatter - Images without alt text (
) - Broken internal links (
@/prefixed paths that don't resolve) - Frontmatter parse errors (TOML/YAML)
- Draft files (reported as info)
Structure diagnostics:
- Section directories missing
_index.md
Example Output
Running diagnostics...
Config:
⚠ config.toml: base_url is not set
⚠ config.toml: feeds.enabled is true but feeds.filename is not set
Content:
⚠ content/blog/draft.md: Missing description in frontmatter
ℹ content/blog/draft.md: File is marked as draft
⚠ content/about.md: Image missing alt text: 
Found 0 error(s), 3 warning(s), 1 info(s)
JSON Output
{
"issues": [
{
"level": "warning",
"category": "config",
"file": "config.toml",
"message": "base_url is not set"
},
{
"level": "warning",
"category": "content",
"file": "content/blog/draft.md",
"message": "Missing description in frontmatter"
},
{
"level": "info",
"category": "content",
"file": "content/blog/draft.md",
"message": "File is marked as draft"
}
],
"summary": {
"errors": 0,
"warnings": 2,
"infos": 1,
"total": 3
}
}