Results:
147 files scanned
89 errors (blocks build)
23 warnings (should fix)
Most common issues:
• 45 files with spaces in filename
• 32 files with uppercase letters
• 12 files with invalid double extensions
Step 3: Categorize Work
Create fix plan based on severity:
Priority
Issue Type
Count
Effort
P0
Spaces in filenames
45
Auto-fix
P0
Uppercase letters
32
Auto-fix
P0
Special characters
7
Auto-fix
P1
Double extensions
12
Manual review
P2
Missing section indexes
8
Manual creation
P3
Orphaned assets
15
Manual cleanup
Phase 2: Automated Cleanup (Day 1-2)
Use auto-fix to handle the majority of issues.
Step 1: Preview Auto-Fix
1
2
3
4
5
# Dry-run to see what would changedocbuilder lint --fix --dry-run > fix-preview.txt
# Review the previewless fix-preview.txt
Example preview:
DRY RUN: No changes will be applied
FILE RENAMES:
docs/API Guide.md → docs/api-guide.md
docs/User Manual.md → docs/user-manual.md
docs/Getting Started.md → docs/getting-started.md
images/Screenshot 2024.png → images/screenshot-2024.png
CONTENT UPDATES:
docs/index.md
Line 15: [API Guide](./API Guide.md)
→ [API Guide](/docbuilder/how-to/api-guide)
Line 23: 
→ 
docs/tutorials/quickstart.md
Line 8: See [Getting Started](../Getting Started.md)
→ See [Getting Started](/docbuilder/getting-started)
Summary:
45 files would be renamed
87 links would be updated across 23 files
Step 2: Apply Auto-Fix
1
2
3
4
# Interactive mode (recommended first time)docbuilder lint --fix
# Confirm when prompted
Expected output:
Found 45 files with naming issues:
Files to rename: 45
Links to update: 87 links in 23 files
This will:
✓ Rename 45 files using git mv (preserves history)
✓ Update 87 internal links
✓ Create backup: .docbuilder-backup-20251229-143052/
Proceed with fixes? [y/N]: y
Fixing issues...
✓ Renamed 45 files
✓ Updated 87 links in 23 files
✓ All changes applied successfully
Run 'git status' to review changes.
Step 3: Review Changes
1
2
3
4
5
6
7
8
9
# Check Git statusgit status
# Review specific changesgit diff docs/index.md
git diff --name-status
# Verify no broken linksfind docs/ -name "*.md" -exec grep -l "API Guide.md"{}\;# Should be empty
Step 4: Test Build
1
2
3
4
5
6
# Verify Hugo build workscd your-repository
docbuilder build -c config.yaml -o /tmp/test-build
# Or if using Hugo directlycd docs && hugo server
Visit http://localhost:1313 and verify:
✅ All pages render correctly
✅ Navigation works
✅ Links work
✅ Images display
Step 5: Commit Automated Fixes
1
2
3
4
5
6
7
8
git add -A
git commit -m "docs: normalize filenames for linting compliance
- Rename files to lowercase with hyphens (45 files)
- Update internal links to renamed files (87 links)
- Preserve Git history with git mv
Generated by: docbuilder lint --fix"
Phase 3: Manual Cleanup (Day 2-3)
Handle issues that require manual intervention.
Issue: Invalid Double Extensions
Example: api-guide.md.backup, notes.markdown.old
Resolution:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Find all double extension filesfind docs/ -name "*.md.*" -o -name "*.markdown.*"# Review and remove backup filesrm docs/api-guide.md.backup
rm docs/notes.markdown.old
# Add to .gitignoreecho"*.backup" >> .gitignore
echo"*.old" >> .gitignore
echo"*.tmp" >> .gitignore
git add -A
git commit -m "docs: remove backup files and update .gitignore"
Issue: Reserved Filenames
Example: docs/tags.md, docs/categories.md
Resolution:
1
2
3
4
5
6
7
8
9
10
# Rename with prefixgit mv docs/tags.md docs/content-tags.md
git mv docs/categories.md docs/content-categories.md
# Update any linksgrep -r "tags.md" docs/ --include="*.md"# Manually update found referencesgit add -A
git commit -m "docs: rename reserved filenames to avoid Hugo conflicts"
Issue: Missing Section Indexes
Example: docs/api/ directory has no _index.md
Resolution:
Create docs/api/_index.md:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
---title:"API Documentation"weight:2description:"Complete API reference and guides"---# API DocumentationThis section contains comprehensive API documentation including:- Authentication and authorization- REST API endpoints- GraphQL schema- SDKs and client libraries
1
2
git add docs/api/_index.md
git commit -m "docs: add missing section index for API documentation"
Issue: Broken Internal Links
Example: Links to moved or deleted files
Resolution:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Find all broken links (requires build or manual check)docbuilder lint # Will report broken links# For each broken link, either:# 1. Fix the target path# 2. Remove the link# 3. Create the missing target file# Example fixvim docs/index.md
# Change: [Old Guide](/docbuilder/how-to/removed-doc)# To: [New Guide](/docbuilder/how-to/current-doc)git add docs/index.md
git commit -m "docs: fix broken link to renamed documentation"
Issue: Orphaned Assets
Example: Images not referenced by any documentation
Resolution:
1
2
3
4
5
6
7
8
# Find orphaned images (requires custom script or manual review)# For each orphaned file, either:# 1. Reference it in documentation# 2. Remove if truly unused# Example removalgit rm docs/images/old-screenshot.png
git commit -m "docs: remove orphaned screenshot"
Phase 4: Git Hooks Setup (Day 3)
Prevent future issues by installing pre-commit hooks.
Subject: Documentation Linting Now Active
Hi team,
We've cleaned up our documentation and enabled automatic linting
to maintain quality going forward.
What changed:
• All docs now use lowercase, hyphen-separated filenames
• Git hooks validate documentation before commit
• CI/CD pipeline checks will catch any issues
What you need to do:
1. Pull latest changes: git pull
2. Install hooks: lefthook install (or docbuilder lint install-hook)
3. Test: lefthook run pre-commit --verbose
Resources:
• Setup guide: docs/how-to/setup-linting.md
• Rule reference: docs/reference/lint-rules.md
• Questions: #docs-tooling Slack channel
Thanks!