Bengal 0.2.3
Default theme blog improvements, excerpt filters, prek migration
Key additions: Major blog template refresh for the default theme (post cards, related posts, author bio, social share), newexcerpt_for_card and card_excerptfilters for preview deduplication, and pre-commit migration to prek.toml.
Highlights
Default Theme Blog Improvements
The blog scaffold and default theme templates received a significant refresh:
- Post cards: New post cards with improved layout and excerpt handling
- Related posts: Related post cards and simple layout variants
- Author bio: Author bio component with avatar support
- Social share: Share dropdown with Reddit, email, and copy-link
- Contact & About: Dedicated contact and about pages for blog scaffold
- Newsletter CTA: Placeholder for newsletter signup
- Comments section: Placeholder for comments integration
- Recipe: Blog-comments theming recipe for customization
Excerpt Filters for Card Previews
New template filters avoid repeating title/description in card excerpts:
excerpt_for_card(title, desc): Deduplicates content against title/description for card previewscard_excerpt(words, title, desc): Trims excerpt to word count while avoiding title/desc repetition
Documented in the reference and cheatsheet.
Tooling
- Prek migration: Pre-commit config moved from
.pre-commit-config.yamltoprek.toml - Ruff 0.15.1: Upgrade with format fixes
- Filter-type-coercion: New rule for YAML numeric param handling in template filters
Other Changes
- Fix: Correct Python 3 except syntax for multi-exception handling
- Cache: Remove unused TypeVar after PEP 695 migration
- CLI help: Troubleshooting cleanup
- Tests:
parallel_unsafemarker for ThreadPoolExecutor tests; stress tests marked slow for faster CI
Breaking Changes
None. Fully backward-compatible release.
Upgrading
uv pip install --upgrade bengal
# or
pip install --upgrade bengal
# or use the self-update command
bengal upgrade