Development notes, release, and insights on BSSG - Bash Static Site Generator

Announcing BSSG 0.31.0: Smart Related Posts, Enhanced Themes, and Improved User Experience

Published on: by Stefano Marinelli

4 min read

I'm excited to announce the release of BSSG version 0.31.0! This release focuses on intelligent content discovery, enhanced accessibility, and improved user experience. With smart related posts functionality, theme improvements, and better semantic HTML structure, this release makes BSSG sites more engaging and accessible than ever before.

This release is all about helping your readers discover more content while making your site more accessible and semantically correct.

Key Highlights in 0.31.0

1. Smart Related Posts Feature

The headline feature of this release is intelligent related posts functionality that automatically suggests relevant content to your readers based on shared tags!

Intelligent Tag-Based Algorithm:

  • Smart Similarity Ranking: Posts are scored based on the number of shared tags with the current post
  • Automatic Content Discovery: Readers see relevant posts without manual curation
  • Performance Optimized: Uses BSSG's existing caching infrastructure for lightning-fast generation

Flexible Configuration:

# Control related posts behavior in config.sh.local
ENABLE_RELATED_POSTS=true    # Enable/disable the feature (default: true)
RELATED_POSTS_COUNT=3        # Number of related posts to show (default: 3)

2. Enhanced Theme Experience

Building on the major theme overhaul in 0.30, this release includes targeted improvements for better accessibility and visual consistency.

Dark Mode Accessibility Fix:

  • Author Name Readability: Fixed hard-coded color styles that made author names invisible in dark themes
  • Theme Variable Integration: Author names now properly use CSS custom properties (var(--text-color))
  • Universal Compatibility: Ensures consistent readability across all themes and color schemes

Italy Theme Enhancement:

  • Enhanced Page Meta Styling: Beautiful new CSS classes for publication metadata
  • Semantic Structure: Proper .page-meta container with organized sub-elements
  • Design Consistency: Maintains Italian Renaissance aesthetic while improving readability
  • Responsive Typography: Optimized font sizes and spacing for all devices

3. Improved Semantic HTML Structure

Better Post Metadata:

  • CSS Class-Based Styling: Replaced inline styles with semantic CSS classes
  • Accessibility Enhancement: Author names now use proper <strong> elements
  • Screen Reader Friendly: Better semantic structure for assistive technologies
  • Separation of Concerns: Clean separation between content and presentation

Enhanced HTML Output:

  • Semantic Time Elements: Proper <time> elements with datetime attributes for better SEO
  • Structured Metadata: Organized post information with consistent class naming
  • Reading Time Integration: Consistent styling approach for reading time estimates

4. Performance and Caching Improvements

Optimized Related Posts Generation:

  • Efficient Tag Comparison: Smart algorithm that only processes posts with shared tags
  • Memory Efficient: Uses temporary files and proper cleanup for large sites
  • Scalable Architecture: Handles sites with hundreds of posts without performance degradation

5. Developer Experience Improvements

Better Code Organization:

  • Modular Related Posts: New scripts/build/related_posts.sh module for easy maintenance
  • Clean Integration: Related posts generation integrated into existing build pipeline
  • Consistent APIs: Follows BSSG's established patterns for configuration and caching

Enhanced Debugging:

  • Clear Error Messages: Better feedback when related posts generation encounters issues
  • Verbose Logging: Optional detailed output for troubleshooting
  • Graceful Failures: System continues working even if related posts fail

Technical Implementation Details

Related Posts Algorithm

The related posts system uses a sophisticated tag-based similarity algorithm:

  1. Tag Extraction: Parses and normalizes tags from the current post
  2. Similarity Scoring: Compares against all other posts, scoring by shared tags
  3. Intelligent Ranking: Sorts by similarity score, then by publication date
  4. Smart Filtering: Excludes the current post and posts without shared tags
  5. Responsive Output: Generates clean HTML with proper semantic structure

Caching Strategy

The system uses intelligent caching for optimal performance:

  • Individual Post Caching: Each post's related posts are cached separately
  • Dependency Tracking: Cache invalidation based on tag relationships
  • Incremental Updates: Only affected posts are regenerated when content changes
  • Build Integration: Automatic cache management during site builds

Important Update Notes

Backward Compatibility:

  • Related posts are enabled by default but can be disabled via configuration
  • All existing sites continue working unchanged without any migration required
  • No breaking changes to existing theme or template systems

Performance Impact:

  • Minimal performance impact thanks to intelligent caching
  • Related posts generation only runs when necessary
  • Build times remain fast even for large sites

Theme Integration:

  • All existing themes automatically support related posts
  • CSS styling adapts to each theme's design language
  • No theme-specific modifications required

Get the Update!

Ready to enhance your BSSG site with intelligent content discovery and improved accessibility?

Upgrading is straightforward:

  1. Pull the latest changes from the repository
  2. Related posts feature is automatically enabled
  3. Multilingual support works immediately with your configured language
  4. No configuration changes required for basic functionality

The new related posts system helps your readers discover more of your content while the theme improvements ensure better accessibility and visual consistency across all devices and themes.

Looking Forward

This release significantly enhances content discoverability and user engagement on BSSG sites. The intelligent related posts system opens up new possibilities for content curation and reader engagement, while the accessibility improvements ensure your site works excellently for all users.

The foundation laid in this release sets the stage for even more intelligent content features and continues BSSG's commitment to being a fast, accessible, and user-friendly static site generator.

Configuration Example

Want to customize the related posts feature? Here's how:

# In your config.sh.local file
ENABLE_RELATED_POSTS=true     # Enable the feature
RELATED_POSTS_COUNT=5         # Show 5 related posts instead of 3

The related posts will automatically appear at the bottom of each post, showing relevant content based on shared tags and encouraging readers to explore more of your site.

As always, your feedback, bug reports, and contributions help make BSSG better with each release. The community's input drives these improvements and helps prioritize future features.

Happy building and happy content discovery!

Stefano