Skip to content

Changelog

This page documents all notable changes to the Astro Maintenance integration across different versions.

  • Custom Handlebars templates must now be imported using ?raw suffix and passed as content instead of file paths
  • File path-based custom templates (e.g., "./templates/custom.hbs") are no longer supported
  • Support for imported template content via import template from './path.hbs?raw'
  • Universal platform compatibility - works identically across Node.js, Cloudflare Workers, Vercel, and Netlify
  • Better error handling and fallback behavior for custom templates
  • Warning messages for deprecated file path usage
  • Enhanced template rendering engine with 83,333+ templates/second performance
  • Removed filesystem-based template loading for improved serverless compatibility
  • Updated template detection logic to differentiate between template content and redirect paths
  • Enhanced reliability with fixed Handlebars conditional rendering issues
  • Filesystem dependencies (fs, path) removed from runtime for serverless compatibility

❌ v1.x (deprecated):

maintenance({
template: "./templates/custom.hbs", // No longer supported
});

v2.0 (required):

import customTemplate from "./templates/custom.hbs?raw";
maintenance({
template: customTemplate, // Pass imported content
});
  • Dark Mode Support: Added automatic dark mode support to all templates

    • Templates now automatically adapt to user system preferences
    • Improved readability in low-light environments
    • Consistent styling across light and dark appearances
  • Social Media Integration: Added support for displaying social media links

    • Configure via the new socials option in the configuration
    • Support for popular platforms (X, GitHub, LinkedIn, Instagram, Facebook, YouTube, Mastodon, Pinterest, TikTok, Discord, Slack, Twitch, Reddit)
    • Visually integrated into all template designs
  • Added comprehensive documentation for social media configuration
  • Updated UI examples to showcase dark mode appearance
  • Environment Variables Support: Added support for configuring all options via environment variables
    • Environment variables now take precedence over programmatically defined options
    • Added MAINTENANCE_* prefix convention for all supported options
    • Enables runtime configuration without rebuilding applications
  • Default Settings Improvement: Made enabled option optional (defaults to true)
  • Testing: Added comprehensive tests for environment variables functionality
  • Added detailed documentation for environment variables
  • Updated configuration documentation to reflect new defaults
  • Adapter Compatibility: Fixed integration to work properly with all Astro adapters
    • Migrated from hook-based implementation to middleware-based approach
    • Ensures consistent behavior across different deployment environments
    • Improved compatibility with SSR deployments
  • Restructured core functionality to use Astro’s middleware API
  • Enhanced error handling and logging
  • Core maintenance page functionality with three built-in templates:
    • Simple maintenance page
    • Countdown timer
    • Under construction
  • Customization options for title, description, logo, and contact information
  • Override parameter for bypassing maintenance mode
  • Support for custom templates via Handlebars
  • Integration with Astro’s configuration system