Table of Contents
Globals
Baseline injects _baseline into global data when you register the plugin. It's a curated object — not the full options bag. Templates and shortcodes see what they need; internal wiring stays internal.
Fields
| Field | Type | Source | Description |
|---|---|---|---|
name |
string | Entry point | Package name (@apleasantview/eleventy-plugin-baseline). |
version |
string | Entry point | Package version. |
verbose |
boolean | Entry point | Whether extra logging is enabled. |
hasImageTransformPlugin |
boolean | Entry point | Whether eleventyImageTransformPlugin is registered. Used by the image shortcode. |
assets.input |
string | assets-core | Resolved assets input path (e.g. src/assets). |
assets.output |
string | assets-core | Resolved assets output path (e.g. dist/assets). |
The entry point sets the top-level fields. assets is added separately by assets-core via addGlobalData('_baseline.assets', ...) — Eleventy's dot-path notation merges it into the same object.
Usage
{{ _baseline.version }}
{% if _baseline.hasImageTransformPlugin %}
<p>Image transforms are active.</p>
{% endif %}
{# Asset paths for inline filters #}
{{ _baseline.assets.input }}
What's not on the global
Plugin options like enableNavigatorTemplate, enableSitemapTemplate, multilingual, defaultLanguage, and languages are passed to modules through their own options — they don't appear on _baseline. If you need to check whether a module is active, the module's own output (collections, templates, filters) is the signal.
Note: verbose and hasImageTransformPlugin are on the global as workarounds — modules that need them don't yet have another way to receive them. This will change when the logging architecture and image shortcode are reworked.
Previous: Config object defaults
Next: Filters