Skip to content

Migration Guide v1.x → v2.0

The only breaking change affects custom Handlebars templates. File path-based templates are no longer supported for serverless compatibility.

// This no longer works in v2.0
import { defineConfig } from "astro/config";
import maintenance from "astro-maintenance";
export default defineConfig({
integrations: [
maintenance({
template: "./templates/custom.hbs", // ❌ File paths not supported
}),
],
});
// Import template content using ?raw
import { defineConfig } from "astro/config";
import maintenance from "astro-maintenance";
import customTemplate from "./templates/custom.hbs?raw";
export default defineConfig({
integrations: [
maintenance({
template: customTemplate, // ✅ Pass imported content
}),
],
});