Announcing BSSG 0.11.0: Site Initialization, Workflow Boosts, and More!
Photo by Clark Tibbs on Unsplash
Hot on the heels of the last release, I'm thrilled to announce BSSG version 0.11.0 is here! This version introduces a major new way to manage your sites, streamlines common workflows, adds useful content features, and improves overall robustness.
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 theOUTPUT_DIR
for the new site.
Enhanced Content Management
- Automatic
lastmod
Handling:- When creating new posts or pages (
./bssg.sh post
,./bssg.sh page
), thelastmod
frontmatter field is now automatically generated, initially matching thedate
. - When editing existing posts or pages (
./bssg.sh edit
), thelastmod
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.
- When creating new posts or pages (
- Full Content in RSS: A new
RSS_INCLUDE_FULL_CONTENT
variable 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 improvedlist
command (see below). - Custom CSS Injection: Easily add your own custom styles! Define a
CUSTOM_CSS
variable inconfig.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 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
vi
fallback and instructions (whenEDITOR
isn't set andnano
is missing) are now consistently applied to thepage
command, mirroring thepost
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-defaultTHEMES_DIR
orTEMPLATES_DIR
settings (especially relevant forinit
-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 thelastmod
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.
Happy blogging!
Stefano