• 0.32.0 f8f4e18be7

    0.32.0 Stable

    stefano released this 2025-07-17 09:11:26 +02:00 | 6 commits to main since this release

    Key Highlights in 0.32.0

    1. Asset Pre-Compression Feature

    The headline feature of this release is the introduction of asset pre-compression. This powerful new capability allows for the creation of gzipped versions of text-based assets (.html, .css, .xml, .js) during the build process.

    Performance-First Architecture:

    • Faster Load Times: By serving smaller, pre-compressed files, your website's loading speed can be dramatically improved. This leads to a better user experience and can positively impact SEO rankings.
    • Reduced Server Load: Compression is a CPU-intensive task. By compressing assets once during the build process instead of on-the-fly for every request, server CPU cycles are saved, which is particularly beneficial for high-traffic sites.
    • Bandwidth Savings: Smaller file sizes translate directly to reduced bandwidth consumption, which can lower hosting costs and improve performance for users on slower networks.

    Flexible Configuration:

    # Control asset pre-compression in config.sh.local
    PRECOMPRESS_ASSETS=true    # Enable/disable the feature (default: false)
    

    To leverage this feature, your web server (like Nginx or Apache) needs to be configured to serve the .gz files when available.

    2. New Themes

    This release is enriched by the addition of two new themes, showcasing the creativity and collaborative spirit of the BSSG community.

    "Thoughtful" Theme:

    • A minimalist and accessible theme designed to provide an optimal reading experience, perfect for personal blogs and long-form content. Its design focuses on clean typography and a layout that keeps the reader's attention on the content.

    "Cyber-Dark" Theme by Nigel Swan:

    • A visually striking, cyberpunk-inspired theme featuring neon shadows and a dark, futuristic aesthetic.
    • This theme was contributed by community member Nigel Swan (lowkey.party). A special thanks to Nigel for this unique and exciting addition to our theme collection.

    3. Enhanced Privacy and Dependency Cleanup

    In a move to improve user privacy and reduce external dependencies, all remaining Google Fonts have been removed from the BSSG codebase.

    • Improved Privacy: Self-hosting fonts prevents the transmission of user IP addresses to third-party servers, which is a key consideration for GDPR compliance.
    • Better Performance: Removing requests to external font providers can reduce DNS lookups and improve page load times.
    • Full Control: This change gives site owners complete control over their assets, ensuring that their sites are self-contained and not reliant on external services.

    Technical Implementation Details

    Asset Pre-Compression Workflow

    The pre-compression system is seamlessly integrated into the existing build process.

    1. Asset Discovery: The build script identifies all text-based assets (.html, .css, .xml, .js) within the public directory.
    2. Gzip Compression: Each discovered asset is then compressed using gzip, creating a corresponding .gz file alongside the original.
    3. Server Configuration: For this to be effective, web servers like Nginx can be configured with gzip_static on; to automatically serve the compressed versions to browsers that support them. Apache can achieve similar results with mod_deflate and mod_rewrite.

    This build-time approach ensures that the performance cost of compression is incurred only once, rather than with every visitor request.

    Important Update Notes

    Backward Compatibility:

    • Asset pre-compression is disabled by default. You must enable it in config.sh.local to use it, ensuring no breaking changes for existing sites.
    • All current themes and configurations will continue to work without any required modifications.

    Performance Impact:

    • Enabling pre-compression will result in a negligible increase in build time.
    • The trade-off is a significant improvement in your site's loading speed and a reduction in server overhead.

    Theme Integration:

    • The new "thoughtful" and "Cyber-Dark" themes can be enabled by setting the THEME variable in your configuration file.

    Get the Update!

    Ready to speed up your site and explore new designs?

    Upgrading is straightforward:

    1. Pull the latest changes from the repository.
    2. To enable asset pre-compression, add PRECOMPRESS_ASSETS=true to your config.sh.local file.
    3. Ensure your web server is configured to serve pre-compressed content.
    4. To switch to a new theme, simply update the THEME variable in your configuration.
    Downloads
  • 0.31.0 70760825b0

    0.31.0 Stable

    stefano released this 2025-06-20 12:02:01 +02:00 | 11 commits to main since this release

    Key Highlights in 0.31.0

    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

    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.

    Downloads
  • 0.30.0 3c88fc7e69

    0.30.0 Stable

    stefano released this 2025-06-02 08:50:16 +02:00 | 12 commits to main since this release

    Key Highlights in 0.30.0

    1. Comprehensive Multi-Author Support

    The headline feature of this release is complete multi-author support throughout BSSG! This feature transforms BSSG from a single-author platform into a collaborative publishing system.

    New Author Frontmatter Fields:

    • author_name: Override the default site author on a per-post basis
    • author_email: Specify custom author email information

    Intelligent Fallback System:

    • Custom Author: Both name and email override defaults
    • Name Only: Just specify author name, email remains empty
    • Default Fallback: Empty fields automatically use site configuration

    Author Index Pages:

    • Main Authors Index: Located at /authors/ with post counts for each author
    • Individual Author Pages: Dedicated pages at /authors/author-slug/ for each author
    • Conditional Navigation: "Authors" menu appears only when multiple authors exist (configurable threshold)
    • Visual Consistency: Reuses existing tag page styling for familiar user experience

    Complete Integration:

    • Schema.org JSON-LD: Proper structured data for search engines
    • RSS Feeds: Dublin Core dc:creator elements with full author attribution
    • Footer Copyright: Dynamic author information in copyright notices
    • Index Listings: "by Author Name" attribution throughout the site
    • Enhanced Sitemap: Author pages automatically included for better SEO

    Configuration Options:

    # Control author page behavior in config.sh.local
    ENABLE_AUTHOR_PAGES=false # Enable/disable author pages (default: false)
    SHOW_AUTHORS_MENU_THRESHOLD=2 # Minimum authors to show menu (default: 2)
    ENABLE_AUTHOR_RSS=false # Author-specific RSS feeds (default: false)
    

    2. Themes 0.30: Complete Overhaul

    This release includes BSSG Themes 0.30, a comprehensive improvement of all 50 included themes focusing on performance, accessibility, and cross-platform compatibility.

    Performance Optimizations:

    • External Font Dependencies Removed: Eliminated Google Fonts and base64 encoded fonts across 35+ themes
    • System Font Stacks: Comprehensive fallback fonts for better performance and reliability
    • Animation Optimization: Added @media (prefers-reduced-motion) support to all themes
    • Mobile Performance: 40-60% improvement in rendering speed on mobile devices
    • Backdrop Filter Optimization: Reduced blur amounts and added mobile fallbacks

    Accessibility Enhancements:

    • WCAG AA Compliance: Tried to achieve 100% compliance across all themes
    • Keyboard Navigation: Complete focus management with visible outlines
    • Screen Reader Support: Enhanced semantic HTML structure and ARIA attributes
    • Reduced Motion: Full support for users who prefer reduced motion

    Cross-Platform Compatibility:

    • Text Browser Support: Full functionality in lynx, w3m, and links browsers
    • Progressive Enhancement: Graceful degradation for older browsers
    • Icon Fallbacks: ASCII alternatives for Unicode symbols and decorative elements

    Critical Theme Fixes:

    • Glassmorphism: Complete redesign for maximum contrast and readability
    • Vaporwave: Optimized neon effects and improved mobile performance
    • Flat: Fixed critical invisible post title bug
    • Retro Computing Themes: Enhanced authenticity while maintaining modern accessibility

    3. Enhanced Development Experience

    Improved Edit Command:

    • Fixed filename generation in edit mode (-n flag) that was causing build failures
    • Clean filename formatting prevents awk errors with spaces in filenames
    • Consistent approach across all BSSG operations

    Better Build Options:

    • Fixed --force-rebuild option that wasn't working as documented
    • Both --force-rebuild and -f now work correctly as aliases
    • Improved help text and command consistency

    Enhanced Post Editor:

    • Fixed datetime-local input showing GMT instead of local time
    • Better date/time handling for content creation
    • Improved user experience in the standalone editor

    4. Quality and Reliability Improvements

    RSS Feed Enhancements:

    • Fixed XML Escaping: Proper escaping of ampersands and special characters in RSS titles and descriptions
    • Image Caption Fix: Eliminated duplicate <figcaption> elements in RSS feeds
    • Valid XML Output: RSS feeds now validate properly with all RSS parsers

    Unicode and Internationalization:

    • German Umlaut Handling: Consistent Unicode character handling in URL slugs across all interfaces
    • Comprehensive Transliteration: Support for German, French, Spanish, Polish, and other European languages
    • Cross-Interface Consistency: Uniform slug generation in command-line tools, web editor, and admin interface

    Better Incremental Builds:

    • New Author Detection: Fixed caching issue where new authors weren't detected during incremental builds
    • Author Page URLs: Fixed incorrect URL generation that didn't honor configured URL_SLUG_FORMAT
    • Dependency Tracking: Improved rebuild logic for author-related content

    Enhanced Post Metadata:

    • Improved Visual Presentation: Better typography and spacing for post metadata banners
    • Semantic HTML: Proper <time> elements with datetime attributes for accessibility and SEO
    • Responsive Design: Metadata that scales appropriately across devices

    5. Technical Improvements

    Sitemap Integration:

    • Author pages automatically included in sitemap.xml when enabled
    • Proper priority levels for SEO optimization
    • Conditional inclusion based on configuration

    Better File Structure:

    • Enhanced templates system with better placeholder replacement
    • Improved navigation generation with conditional menu display
    • Standardized component patterns across the codebase

    Important Update Notes

    Theme Compatibility:

    • All 50 themes maintain their visual identity while gaining performance and accessibility improvements
    • No breaking changes for existing installations
    • Themes now work excellently across all browsers and devices

    Multi-Author Migration:

    • Existing single-author sites continue working unchanged
    • Author fields are optional and fall back to site configuration
    • No migration required for existing content

    Performance Recommendations:

    • Themes now work optimally without external dependencies
    • Mobile experience significantly improved across all themes

    Get the Update!

    Ready to transform your BSSG site into a collaborative, accessible, and high-performance publishing platform?

    Upgrading is straightforward:

    1. Pull the latest changes from the repository
    2. Multi-author features are automatically available
    3. All themes are immediately improved
    4. No configuration changes required
    Downloads
  • 0.20.0 e8c98d10ab

    0.20.0 Stable

    stefano released this 2025-05-25 19:34:58 +02:00 | 16 commits to main since this release

    Key Highlights in 0.20.0

    1. Introducing the BSSG Post Editor (bssg-editor.html)

    The star of this release is the brand-new BSSG Post Editor! This is a complete, standalone post editor that runs entirely in your browser as a single HTML file (bssg-editor.html), requiring no backend or complex setup.

    Key features of the BSSG Post Editor include:

    • Ghost-like Interface: Enjoy a modern, clean, split-pane interface with a Markdown editor on one side and a live preview on the other.
    • Complete Frontmatter Support: Easily manage all BSSG frontmatter fields: title, date, lastmod, tags, slug, description, image, and image_caption.
    • Unsplash Integration: Browse and select stunning featured images directly from Unsplash, with automatic, proper attribution for the image_caption.
    • Smart Auto-Save: Never lose your work with multiple auto-save triggers: every 10 words typed, after 5 seconds of inactivity, plus manual save.
    • Article Management: A local storage-based system lets you save, load, search, and delete your articles directly within the editor.
    • Rich Markdown Toolbar: A comprehensive formatting toolbar provides quick access to headers, lists, bold, italics, links, images, code blocks, quotes, and more.
    • Keyboard Shortcuts: Boost your productivity with full keyboard shortcut support (e.g., Ctrl+B for bold, Ctrl+I for italic, Ctrl+S to save).
    • Theme Support: Toggle between dark and light themes, with automatic detection of your system preference.
    • Focus Mode: Minimize distractions and concentrate on your writing.
    • Versatile Export Options: Export your posts as BSSG-compatible .md files (with correct naming conventions), copy Markdown to your clipboard, or import existing Markdown files.
    • Responsive Design: The editor works beautifully across desktop, tablet, and mobile devices. (Not perfect on mobile, yet)
    • Offline Capable: Being a single HTML file, it runs entirely in the browser and works offline.
    • Seamless BSSG Integration: Generates Markdown files with proper frontmatter and file naming conventions ready for BSSG.

    The BSSG Post Editor is designed to make content creation for your BSSG site intuitive, efficient, and enjoyable.

    2. Enhanced Local Development Server (./bssg.sh server)

    The experimental local development server introduced previously is now an official and enhanced feature!

    • The ./bssg.sh server command builds your static site and then starts an HTTP server to serve your output/ directory.
    • Dynamic SITE_URL Override: When initiating a build, the server command temporarily sets the SITE_URL to match the local server's address (e.g., http://localhost:8000). This ensures all links and asset paths are correct for local previewing without needing to change your production SITE_URL.
    • Improved Performance with socat: The server now prefers socat if available, enabling concurrent request handling. This means faster loading of pages with multiple images and a more reliable preview experience. netcat serves as a fallback, with a warning about its single-threaded limitations.
    • Configurable Defaults: You can now set default port and host for the server in your config.sh (or override in config.sh.local) using BSSG_SERVER_PORT_DEFAULT and BSSG_SERVER_HOST_DEFAULT. These defaults are also shown in the help message.
    • Command-line Options:
      • --port <PORT>: Specify a custom port.
      • --host <HOST>: Specify a custom host/IP.
      • --no-build: Skip the build step and serve existing output/ content.

    3. Under-the-Hood Improvements

    • The main bssg.sh script has been updated to incorporate the server command logic, robust argument parsing, and informative help text.
    • scripts/build/config_loader.sh now loads and exports the new server default configuration variables.
    • config.sh includes the new default server configuration variables.

    4. Community Contributions & Fixes

    This release also incorporates several important fixes and refinements, making BSSG more robust and reliable. A special thank you goes out to the great people from our community who contributed their time and expertise to help identify and resolve issues. Your contributions are invaluable!

    Downloads
  • 0.16.1 e494aed35b

    stefano released this 2025-05-18 08:49:46 +02:00 | 24 commits to main since this release

    • Configurable RSS feed filenames. The main RSS feed and tag-specific RSS feeds can now have their filenames customized via the RSS_FILENAME option in config.sh (or config.sh.local). Defaults to rss.xml if not specified.

    • Fixed the generate_theme_previews.sh - now working with a website generated by the init command

    Downloads
  • 0.16.0 ded254d171

    stefano released this 2025-05-12 11:59:50 +02:00 | 27 commits to main since this release

    Key Highlights in 0.16.0

    This update focuses on providing finer-grained control over your BSSG environment and site structure:

    1. Superior Site Configuration Flexibility (--config & BSSG_LCONF)

    Managing multiple sites or specific build contexts just got easier!

    • The --config <path> command-line flag has been re-implemented for bssg.sh. This allows you to specify a custom configuration file (e.g., a site's config.sh.local) to override default settings. It's perfect for running commands from the BSSG core directory while targeting a specific site.
    • Additionally, the new BSSG_LCONF environment variable provides an alternative. If set to a valid configuration file path, BSSG will use it when --config isn't specified, letting you set a site context for your entire session.

    2. Customizable Build Cache Location (CACHE_DIR)

    You now have direct control over where BSSG stores its build cache.

    • A new configuration variable, CACHE_DIR, has been added to config.sh (defaulting to .bssg_cache in the BSSG core directory).
    • You can set this to a custom path, allowing you to, for example, place caches on a different drive, organize them per-project outside the site directory, or manage them according to your backup strategy.

    3. New Comprehensive Archive Listing (ARCHIVES_LIST_ALL_POSTS)

    Offer your readers a more detailed view of your archives!

    • The new ARCHIVES_LIST_ALL_POSTS option (default false in config.sh) allows the main archives/index.html page to list all posts chronologically under their respective month links. This is in addition to the standard year/month navigation, providing an at-a-glance view of all content.

    4. Smoother Site Initialization & Cache Management

    I've refined the init script for a better out-of-the-box experience:

    • When you initialize a new site, the init script now adds a CACHE_DIR setting to the new site's config.sh.local, pointing to .bssg_cache within that site's directory. This ensures each initialized site maintains its own separate cache, preventing interference.
    • The init script now defaults to 'Yes' (Y) when asking whether to modify the core config.sh.local to automatically source the new site's configuration, streamlining setup.

    5. Important Fixes and Stability

    This release also includes targeted fixes:

    • The main archive index page (archives/index.html) now correctly rebuilds when ARCHIVES_LIST_ALL_POSTS is true and post content changes, ensuring your comprehensive archive view is always up-to-date.

    Important Update Notes

    No major breaking changes requiring specific actions like a clean rebuild are anticipated with this release. However, to take advantage of the new site-specific caching initialized by bssg.sh init, new sites will benefit immediately. For existing sites, you might consider manually adding CACHE_DIR="/path/to/your/site/.bssg_cache" to your site's config.sh.local if you desire isolated caching.

    Downloads
  • 0.15.1 81e8b8d5de

    stefano released this 2025-04-21 12:43:05 +02:00 | 37 commits to main since this release

    Just a small release, fixing a (minor, mainly cosmetic) issue with the indexing procedure - changed the file comparison procedure for NetBSD compatibility

    Downloads
  • 0.15.0 7b3539de65

    stefano released this 2025-04-21 08:36:44 +02:00 | 38 commits to main since this release

    Key Highlights in 0.15.0

    This release focuses on speed, efficiency, and providing more control over your site's appearance:

    1. Major Performance Improvements & Smarter Rebuilds

    Get ready for faster builds! This release incorporates a significant performance boost, thanks in large part to a partial rewrite of the caching and index generation logic. Now, BSSG intelligently detects changes and only regenerates modified tag and archive pages, rather than rebuilding all of them every time. This drastically reduces rebuild times, especially for sites with many posts and tags.

    2. Customizable Homepage via pages/index.md

    Gain full control over your site's front page! You can now create a custom homepage by adding a file named index.md inside your pages directory. If this file exists and has the slug "index", BSSG will use its content as the site's homepage, completely skipping the default "Latest Posts" listing. This allows for truly unique landing pages. (Based on a patch by Tom).

    3. HTML Rendering for Post Excerpts

    Enhance the look of your list pages! When a post doesn't have an explicit description set in its frontmatter, the automatically generated excerpt (taken from the post's beginning) is now rendered as text on index, tag, and archive pages, instead of appearing as raw Markdown.

    4. Conditional "Tags" Menu Generation

    Keep your navigation clean and relevant. The global "Tags" list page and its corresponding menu item in the site header will no longer be generated if no posts on your site actually use tags. This provides a cleaner experience for sites that don't utilize the tagging feature. (Based on a patch by Tom).

    5. Bug Fixes and Under-the-Hood Improvements

    As always, this release includes numerous smaller bug fixes and enhancements identified since the last version, further improving the stability and reliability of BSSG.

    Important Update Notes

    Given the significant changes to the caching and index generation systems, performing a clean rebuild after updating is highly recommended to ensure everything functions correctly and you benefit fully from the performance improvements:

    ./bssg.sh build --clean-output
    

    Happy building!

    Stefano

    Downloads
  • 0.12.1 9976dfdf3f

    stefano released this 2025-04-16 09:16:10 +02:00 | 53 commits to main since this release

    Key Highlights in 0.12.1

    This release focuses heavily on automation, flexibility, and convenience:

    1. Powerful Build-Time Configuration Overrides

    You now have fine-grained control over your build process directly from the command line, without needing to edit configuration files for temporary changes or specific scenarios. The ./bssg.sh build command accepts numerous new arguments to override settings:

    • Core Paths: --config, --local-config, --src, --output, --templates, --theme, --static, --pages, --drafts, --themes-dir
    • Site Metadata: --site-title, --site-url, --site-description, --author-name, --author-email
    • Build Options: --posts-per-page, --clean-output, --force-rebuild

    Example: Test a build with a different output directory:

    ./bssg.sh build --output /tmp/bssg-test
    

    This is fantastic for scripting, CI/CD pipelines, or simply testing variations quickly.

    2. Create Posts Entirely from the Command Line

    The ./bssg.sh post command has been supercharged! You can now create new posts completely non-interactively, specifying details via options:

    • -t "<title>": Set the post title.
    • -T <tag1,tag2>: Assign tags (comma-separated).
    • -s <custom-slug>: Specify a custom slug.
    • -c "<content>": Provide post content directly as a string.
    • -f <filepath>: Use content from a file.
    • --stdin: Read post content from standard input.
    • --html: Create the post with an .html extension (instead of .md).
    • -d: Create the post in the drafts directory.

    You can even force a rebuild immediately after creation, even if REBUILD_AFTER_POST is false in your config, using the --build flag:

    echo "My quick post content." | ./bssg.sh post -t "Quick Update" -T announcement --stdin --build
    

    This opens up exciting possibilities for automated content generation or integration with other tools.

    3. Integrated Deployment Hooks

    Bridge the gap between building and deploying your site! BSSG now includes configuration options to automatically trigger your deployment process:

    • DEPLOY_AFTER_BUILD="true": Set this in your config to run the deployment script after every successful build.
    • DEPLOY_SCRIPT="/path/to/your/deploy.sh": Specify the script to execute.

    You can also override this behavior for specific builds using command-line flags:

    • ./bssg.sh build --deploy: Force deployment even if DEPLOY_AFTER_BUILD is false.
    • ./bssg.sh build --no-deploy: Prevent deployment even if DEPLOY_AFTER_BUILD is true.

    Streamline your publishing workflow with this simple yet powerful integration.

    4. Optional Per-Tag RSS Feeds

    As previewed recently in the main branch, you can now enable the generation of separate RSS feeds for each tag on your site. This allows your readers to subscribe specifically to the topics they care about most.

    • Enable via ENABLE_TAG_RSS="true" in your configuration (defaults to false).
    • Feeds are generated at ${OUTPUT_DIR}/tags/<tag_slug>/rss.xml.
    • Auto-discovery links are automatically added to tag pages.

    5. Bug Fixes

    This release also incorporates several bug fixes identified since 0.11.0, enhancing the overall stability and reliability of BSSG. Particular attention has been paid to improving the backup and restore procedures.

    Important Update Notes

    While this release primarily adds new features and options, the scope of changes (especially around build overrides and deployment hooks) is significant. To ensure all new functionalities work correctly and integrate smoothly with your setup, performing a clean rebuild after updating is recommended:

    ./bssg.sh build --clean-output --force-rebuild
    

    Review the new configuration options (ENABLE_TAG_RSS, DEPLOY_AFTER_BUILD, DEPLOY_SCRIPT) and consider how they might benefit your workflow.

    Downloads
  • 0.11.0 e8538f872f

    stefano released this 2025-04-14 10:45:22 +02:00 | 64 commits to main since this release

    Key Highlights in 0.11.0

    Introducing Site Initialization (init)

    This is the headline feature! BSSG now includes an init <directory> command.

    • What it does: Creates a new, clean site structure in the specified directory (~/mysite, ./my-new-blog, etc.). This structure includes standard directories (src/, output/, static/, drafts/) and a site-specific configuration file (config.sh.local).
    • Why it's great: This allows you to keep your website's content completely separate from the BSSG core installation. Updating BSSG becomes much simpler (just update the core installation), and your site content remains organized independently. The generated config.sh.local automatically sets up the OUTPUT_DIR for the new site.

    Enhanced Content Management

    • Automatic lastmod Handling:
      • When creating new posts or pages (./bssg.sh post, ./bssg.sh page), the lastmod frontmatter field is now automatically generated, initially matching the date.
      • When editing existing posts or pages (./bssg.sh edit), the lastmod field is automatically updated to the current date and time before the editor opens. This ensures your modification dates are always accurate in sitemaps, RSS feeds, and the "Updated on" notice without manual effort.
    • Full Content in RSS: A new RSS_INCLUDE_FULL_CONTENT variable in config.sh (defaulting to false) lets you choose whether to include the complete post content within the <description> tag of your RSS feed items.
    • Drafts Support: You can now configure a specific DRAFTS_DIR (defaults to drafts/) in config.sh. Draft posts and pages can be managed separately and listed using the improved list command (see below).
    • Custom CSS Injection: Easily add your own custom styles! Define a CUSTOM_CSS variable in config.sh pointing to a CSS file within your $STATIC_DIR (e.g., static/custom.css). BSSG will automatically link this stylesheet after the theme's CSS in your site's header.

    Improved Workflow & Consistency

    • Centralized Configuration: Configuration loading (config.sh, config.sh.local) is now handled centrally within bssg.sh. This ensures all commands (post, page, edit, build, etc.) use the same consistent settings and correctly expanded paths (including ~).
    • Robust Editor Fallback: The helpful vi fallback and instructions (when EDITOR isn't set and nano is missing) are now consistently applied to the page command, mirroring the post command behavior.
    • Automatic Rebuild for New Pages: Creating a new non-draft page now triggers a clean, full rebuild to ensure it immediately appears in navigation and indexes.

    Bug Fixes & Robustness

    • Theme & Template Loading: Fixed issues where theme CSS (style.css) and core structural templates (header.html, footer.html) weren't located correctly when using non-default THEMES_DIR or TEMPLATES_DIR settings (especially relevant for init-created sites). Themes now correctly control only styling, not core structure.
    • Secondary Page Index: Corrected a bug that caused pages.html to only list one page. Index generation is now reliable and includes caching for efficiency.
    • Tilde Expansion: Path variables in configuration using ~ (e.g., SRC_DIR="~/myblog/src") are now expanded more robustly.
    • Internal Refinements: Continued refactoring of internal scripts (post.sh, page.sh, edit.sh, etc.) to use configured variables consistently and rely on centrally loaded configuration, reducing redundancy. Fixed a syntax error in secondary page generation.

    Important Update Notes

    • The new ./bssg.sh init command provides a better way to structure new BSSG sites going forward, separating site content from the BSSG application itself. Consider using this for future projects!
    • Be aware that the ./bssg.sh edit command now automatically updates the lastmod frontmatter field.
    • While this release focuses on new features and fixes, performing a clean rebuild after updating is always good practice to ensure all changes take effect correctly:
    ./bssg.sh build --clean-output --force-rebuild
    

    Get the Update!

    Update to BSSG 0.11.0 to benefit from site initialization, improved content management, workflow enhancements, and increased stability.

    Downloads