Expand description
Interactive islands — lazy-hydrating Web Components. Resumable hydration — interactive islands (Web Components).
Provides an <ssg-island> custom element that lazily loads JavaScript
component bundles based on configurable hydration strategies:
visible (IntersectionObserver), idle (requestIdleCallback), or
interaction (click/focus/hover).
§Architecture
- Content authors use
{{< island component="counter" hydrate="visible" >}} - The shortcode expands to
<ssg-island component="counter" hydrate="visible"> - This plugin scans HTML for
<ssg-island>elements and:- Copies user-provided island bundles from
islands/to_islands/ - Generates
_islands/manifest.jsonlisting all referenced components - Injects the
ssg-island.jscustom element loader into pages
- Copies user-provided island bundles from
Structs§
- Island
Plugin - Plugin that enables interactive islands via Web Components.