Skip to content

v4.1.0

Choose a tag to compare

@LebCit LebCit released this 10 Jul 10:23
· 2 commits to master since this release

Blog-Doc 4.1.0

Highlights

This release improves the build experience with optional formatting support, adds a CLI build command, improves project setup defaults, preserves content directory structure in Git, and refreshes the default theme.

Features

Optional Prettier integration

  • Added optional Prettier-powered formatting during builds.
  • Prettier is loaded lazily and remains an optional dependency.
  • Assets and HTML output are formatted when supported, with graceful fallback behavior.
  • Build summaries now show whether formatting was applied.
  • Missing Prettier is reported once per build instead of failing silently.

New build CLI

  • Added npm run build support through a new CLI entry point.

  • Uses the same build pipeline as the /admin/build route.

  • Returns proper exit codes for automation:

    • 0 for successful builds
    • 1 when build errors occur

Improved project setup and content handling

  • Added automatic provisioning of missing config and tooling files.
  • Moved default templates into the defaults directory.
  • Creates missing parent directories automatically.
  • Preserves existing user files by avoiding overwrites.
  • Simplified ignored file handling.
  • Updated .gitignore rules to ignore user content while preserving the expected directory structure.
  • Keeps content directories (images, pages, and posts) tracked through placeholder files, making fresh installations easier to initialize.

Default theme updates

  • Reorganized theme comments.
  • Removed unused templates and markup.
  • Fixed default menu conditional loading.

Fixes

  • Fixed HTML entity decoding in plainTextExcerpt for numeric, hexadecimal, and named entities.
  • Prevented malformed excerpt output caused by incorrectly decoded entities.
  • Reduced unnecessary filesystem imports and removed unused code paths.
  • Improved internal naming clarity around Prettier loading state.

Breaking Changes

None.

Dependency Updates

  • Updated modules to their latest versions.
  • Bumped version from 4.0.0 to 4.1.0.

Upgrade Notes

Prettier remains optional. No configuration changes are required, and existing installations continue to work with the lightweight default build behavior.

Existing repositories may want to review their .gitignore rules if they previously ignored the entire app/content/ directory, as the new structure keeps the content folders present while still ignoring user-generated files.

Full Changelog: v4.0.0...v4.1.0