Skip to content

v1.2.0 - 7 new modules

Choose a tag to compare

@RickCogley RickCogley released this 21 Nov 01:36
· 13 commits to main since this release
150a241

Hibana v1.2.0 - Phase 1 Expansion Release

🎉 Major Feature Additions

This release adds 7 powerful new modules extracted from the eSolia 2025 project, significantly expanding Hibana's capabilities for Lume static site generators.

✨ New Features

Filters

  • temporalDate - Modern date formatting using the Temporal API
    • Timezone-aware formatting with configurable defaults
    • Multiple format styles: full, long, medium, short, iso
    • Full locale support for internationalization
    • Type-safe with comprehensive error handling

Preprocessors

  • markdownMetadata - Extract excerpts and calculate elapsed days
    • Configurable excerpt markers (default: )
    • Automatic elapsed days calculation using Temporal API
    • Optional feature toggling
  • breadcrumbSchema - Auto-generate Schema.org breadcrumbs
    • Creates breadcrumb structured data from URL paths
    • Multilingual support with configurable home page names
    • Includes helper function for manual breadcrumb creation
  • languageAlternatesSchema - Link translated pages via Schema.org
    • Maps pages by ID across different languages
    • Adds translationOfWork / workTranslation properties
    • Supports multiple schema types per page

Scripts

  • fixFontPaths - Fix Google Fonts relative paths in CSS
    • Platform-aware (macOS vs Linux sed syntax)
    • Batch processing for multiple CSS files
    • Safe sed operations with proper escaping
  • injectDoctype - Inject DOCTYPE into HTML files
    • Workaround for Lume 3.x DOCTYPE handling
    • Platform-aware sed commands
    • Removes duplicates before injecting

Utilities

  • DOM Utilities Additions:
    • prefersReducedMotion() - Check user's motion preference (accessibility)
    • detectOS() - Detect operating system
    • addOSClass() - Auto-add OS class to document body

🔧 Improvements

  • Dependencies: Upgraded Lume from v3.0.4 to v3.1.2
  • Developer Experience:
    • Added task scripts in deno.json: test, check, fmt, lint, doc
    • Configured lint rules to exclude generated files
    • Added Temporal API support flag for tests
  • Documentation:
    • Comprehensive README rewrite with detailed API documentation
    • All new features documented with examples
    • Added CLAUDE.md for AI-assisted development context
    • Fresh API documentation in docs/api/
    • Detailed CHANGELOG with all changes

🧪 Testing

  • Added unit tests for all new modules
  • Test suite includes 20 tests (13 passing, 7 need refinement)
  • Tests use Temporal API with proper unstable flags

📦 Migration Benefits

Projects migrating from custom implementations can expect:

  • 400-500 lines of code reduction in typical use cases
  • Standardized, tested implementations
  • Better type safety and error handling
  • See docs/EXTRACTION_SUMMARY.md for detailed migration examples

⚙️ Requirements

  • Deno: 1.40+ (for Temporal API support)
  • Lume: 3.x (tested with 3.1.2)
  • Platform: Unix/Linux/macOS for script utilities (sed required)

📝 Notes

  • Not published on JSR due to Lume's https import requirements
  • Uses any types for Lume compatibility (intentional design choice)
  • Schema.org preprocessors assume specific frontmatter structure

🔗 Resources

  • Full documentation in README.md
  • API docs available in docs/api/
  • Migration guide in docs/EXTRACTION_SUMMARY.md

Full Changelog: v1.1.0...v1.2.0