-
released this
2025-04-16 09:16:10 +02:00 | 62 commits to main since this releaseKey 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 buildcommand 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-testThis is fantastic for scripting, CI/CD pipelines, or simply testing variations quickly.
2. Create Posts Entirely from the Command Line
The
./bssg.sh postcommand 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.htmlextension (instead of.md).-d: Create the post in the drafts directory.
You can even force a rebuild immediately after creation, even if
REBUILD_AFTER_POSTis false in your config, using the--buildflag:echo "My quick post content." | ./bssg.sh post -t "Quick Update" -T announcement --stdin --buildThis 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 ifDEPLOY_AFTER_BUILDis false../bssg.sh build --no-deploy: Prevent deployment even ifDEPLOY_AFTER_BUILDis true.
Streamline your publishing workflow with this simple yet powerful integration.
4. Optional Per-Tag RSS Feeds
As previewed recently in the
mainbranch, 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 tofalse). - 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-rebuildReview the new configuration options (
ENABLE_TAG_RSS,DEPLOY_AFTER_BUILD,DEPLOY_SCRIPT) and consider how they might benefit your workflow.Downloads
-
Source code (ZIP)
6 downloads
-
Source code (TAR.GZ)
6 downloads
- Core Paths:
-
released this
2025-04-14 10:45:22 +02:00 | 73 commits to main since this releaseKey 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.localautomatically sets up theOUTPUT_DIRfor the new site.
Enhanced Content Management
- Automatic
lastmodHandling:- When creating new posts or pages (
./bssg.sh post,./bssg.sh page), thelastmodfrontmatter field is now automatically generated, initially matching thedate. - When editing existing posts or pages (
./bssg.sh edit), thelastmodfield 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.
- When creating new posts or pages (
- Full Content in RSS: A new
RSS_INCLUDE_FULL_CONTENTvariable inconfig.sh(defaulting tofalse) 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 todrafts/) inconfig.sh. Draft posts and pages can be managed separately and listed using the improvedlistcommand (see below). - Custom CSS Injection: Easily add your own custom styles! Define a
CUSTOM_CSSvariable inconfig.shpointing 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 withinbssg.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
vifallback and instructions (whenEDITORisn't set andnanois missing) are now consistently applied to thepagecommand, mirroring thepostcommand 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-defaultTHEMES_DIRorTEMPLATES_DIRsettings (especially relevant forinit-created sites). Themes now correctly control only styling, not core structure. - Secondary Page Index: Corrected a bug that caused
pages.htmlto 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 initcommand 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 editcommand now automatically updates thelastmodfrontmatter 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-rebuildGet the Update!
Update to BSSG 0.11.0 to benefit from site initialization, improved content management, workflow enhancements, and increased stability.
Downloads
-
Source code (ZIP)
5 downloads
-
Source code (TAR.GZ)
7 downloads
- What it does: Creates a new, clean site structure in the specified directory (
-
released this
2025-04-13 13:07:46 +02:00 | 84 commits to main since this releaseKey Highlights in 0.10.0
Enhanced Configuration
I've added several new variables to
config.shto give you more control over your site's behavior:RSS_ITEM_LIMIT: Customize the number of posts included in your RSS feed (defaults to 15).SHOW_TIMEZONE: Choose whether to display timezone offsets alongside dates throughout your site (defaults tofalse).REBUILD_AFTER_POST&REBUILD_AFTER_EDIT: Decide if the site should automatically rebuild after creating or editing posts using the./bssg.sh postand./bssg.sh editcommands (defaults totrue).
Improved Post Management
lastmodFrontmatter: You can now add an optionallastmodfield to your post's frontmatter. This allows you to specify a modification date separate from the original publishdate. This modification date will be used in yoursitemap.xmland RSS feed (<atom:updated>). If thelastmoddate differs from thedate, an "Updated on" notice will also appear on the post page itself.
User Experience Touches
- "Back to Top" Link: A localized "Back to Top" link has been added to the footer for easier navigation on long pages.
- Minimal Theme Enhancements: The included
minimaltheme has received visual tweaks and improvements for a cleaner look. - Editor Fallback Easter Egg: If the
EDITORenvironment variable isn't set andnanoisn't available, BSSG will now fall back to usingvi. As a small helper, ifviis used as the fallback, thepostandeditscripts will provide instructions on how to save and exitvi.
Internal Refinements
- Build Process Refactoring: The internal build logic has been reorganized from a single script (
scripts/build.sh) into multiple focused scripts within thescripts/build/directory. While this is an internal change aimed at improving efficiency and output quality, it represents a significant shift in the build process structure. Don't worry, the user-facing command./bssg.sh buildremains exactly the same!
Important Update Notes
While the main
./bssg.sh buildcommand functions as before, the internal refactoring mentioned above is a significant change. If you have custom scripts that interacted with the oldscripts/build.sh(like potentiallygenerate_theme_previews.shif customized) or have heavily modified theme templates (like the footer), please review them carefully after updating to ensure they still work as expected with the new build structure in thescripts/build/directory.To ensure a smooth transition and avoid potential issues from leftover files, I strongly recommend performing a clean rebuild after updating:
./bssg.sh build --clean-output --force-rebuildDownloads
-
Source code (ZIP)
5 downloads
-
Source code (TAR.GZ)
6 downloads
-
released this
2025-04-08 22:16:49 +02:00 | 91 commits to main since this release- Older/Newer for page navigation were inverted
- reader-mode theme had some problems with images, now fixed
Downloads
-
Source code (ZIP)
3 downloads
-
Source code (TAR.GZ)
0 downloads
-
Bugfix for sitemap and rss Stable
released this
2025-04-08 21:21:27 +02:00 | 92 commits to main since this releaseFixed
- Sitemap (
sitemap.xml) now includes entries for pages defined in the$PAGES_DIR. - Sitemap uses the article's frontmatter date (YYYY-MM-DD) for the
<lastmod>tag for posts, instead of the file modification time. Tags and archives still use file modification time. Index pages use build time. - RSS feed (
rss.xml) now correctly uses the article's frontmatter date for<pubDate>. If the frontmatter date lacks a time component, it defaults to midnight (00:00:00) of that date, rather than using the build time.
Downloads
-
Source code (ZIP)
3 downloads
-
Source code (TAR.GZ)
2 downloads
- Sitemap (
-
released this
2025-04-06 19:37:54 +02:00 | 93 commits to main since this releaseThis marks the first public release of BSSG - Bash Static Site Generator (v0.9)!
After nearly a decade of personal development and use, stemming from a journey away from complex dynamic CMS platforms like WordPress, BSSG is now available for everyone. It represents a desire for a simpler, more portable, and owner-controlled way to manage personal blogs and websites.
Read the full story behind its creation here: Launching BSSG - My Journey from Dynamic CMS to Bash Static Site Generator
What is BSSG?
BSSG is a static site generator written entirely in Bash script. It takes Markdown files (with simple frontmatter) for posts and pages and generates a complete, static HTML website. It's designed with portability and simplicity in mind, aiming to be a robust alternative for blogs where content doesn't change every second.
Key Features in this Release:
- Portability: Designed to run on Linux, FreeBSD, OpenBSD, NetBSD, and macOS with minimal dependencies (Bash, standard Unix utils, a Markdown processor).
- Markdown Support: Uses Pandoc, CommonMark (cmark), or markdown.pl for processing content.
- Essential Blogging Features: Generates RSS feeds, sitemap.xml, tag pages, yearly/monthly archives, OpenGraph tags, and calculates reading times.
- Simple Theming: Easily switch themes by changing a CSS file. Over 50 diverse themes included (from modern to retro-computing styles)! Includes a script (
generate_theme_previews.sh) to preview your site with all themes. - Performance: Includes incremental builds, metadata caching, and optional parallel build support via GNU
parallelto handle larger sites efficiently. - Utilities: Built-in backup and restore scripts for easy content management.
- Internationalization (i18n): Supports generating the site in different languages (site-wide, not multilingual posts yet).
- Customization: Configurable slugs, posts per page, date formats, timezones, and more via
config.sh.local. - Static Files & Pages: Easily include static assets (images, CSS, JS) and create static pages alongside blog posts.
- BSD Licensed: Freedom to use and modify.
Why v0.9?
While BSSG is stable and has been used personally and by some clients for years, this initial public release acknowledges that the codebase (especially
build.sh) grew organically and could benefit from refactoring. Future releases will focus on code cleanup, potential new features (likelastmodtimestamps), and addressing any issues found by the community. The core functionality should be solid and ready for use.(Note: An experimental Node.js admin interface exists but is not included in this core release bundle as it requires further testing.)
Getting Started:
- Clone the repository.
- Install dependencies (usually just
bashandcmarkorpandoc). - Run
./bssg.sh postto create your first post. - Run
./bssg.sh buildto generate your site in theoutput/directory. - Check the README.md for full details.
I hope BSSG proves useful for those seeking a straightforward, shell-based approach to static site generation.
Happy Blogging!
Downloads
-
Source code (ZIP)
1 download
-
Source code (TAR.GZ)
4 downloads