Post-processing runs after all pages are rendered and performs site-wide operations like sitemap generation, RSS feeds, and link validation.
Sitemap Generator (bengal/postprocess/sitemap.py)
Purpose
Generates XML sitemap for SEO
Features
- Generates XML sitemap for SEO
- Includes all pages with metadata
- Configurable priority and change frequency
- Validates URL structure
- Follows sitemap.xml protocol
Configuration
1 2 3 4 | |
Output Format
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | |
RSS Generator (bengal/postprocess/rss.py)
Purpose
Generates RSS feed for blog posts
Features
- Generates RSS 2.0 feed
- Includes recent posts
- Supports custom descriptions
- Configurable item count
- Full content or excerpts
Configuration
1 2 3 4 | |
Output Format
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | |
Link Validator (bengal/rendering/link_validator.py)
Purpose
Validates internal and external links
Features
- Validates internal and external links
- Reports broken links
- Can be extended for comprehensive validation
- Configurable checking depth
- Supports link ignoring patterns
Configuration
1 2 3 4 | |
Validation Process
- Extract all links from rendered HTML
- Categorize as internal or external
- For internal links:
- Check if target page exists
- Verify anchor IDs exist
- For external links (optional):
- Make HEAD request
- Check response status
- Report broken links with context
Output Example
Link Validation Results:
✓ 245 internal links valid
✗ 3 broken links found:
- /docs/missing-page/ (referenced in /blog/post.html)
- /guide/#invalid-anchor (referenced in /index.html)
- https://example.com/404 (referenced in /links.html)
Special Page Generation
404 Page
Generated automatically iftemplates/404.htmlexists
Search Index
JSON index for client-side search (if enabled)
Archive Pages
Chronological page listings by year/month
Parallel Post-Processing
Post-processing tasks can run in parallel for better performance:
1 2 3 4 5 6 7 8 9 | |
Impact: 2x speedup measured on typical sites