Documentation — Table of Contents
assets-core
Note: The options API is still evolving; expect tweaks as the project grows.
What it does
- Creates a virtual
assetsdirectory in Eleventy. - Resolves assets input/output directories and exposes them via
_baseline.assets. - Adds a watch target under the resolved assets directory.
Defaults
- Assets live under
src/assets/(via Eleventy dir settings). - Virtual dir key: fixed to
assets(addsdirectories.assetsif not already defined). - Respects Baseline
verboseflag for logging. - Output: uses Eleventy’s
dir.output(defaultdist) and mirrorsdir.assetsinto it.
Options
- None. Inherits global Baseline
verbose. - Peer deps: none (built-in).
How it works
- On
eleventy.directories, resolves input/output/assets paths and definesdirectories.assets. - Exposes global data at
_baseline.assetswithinputandoutput. - Adds a watch target under the resolved assets directory (
**/*.{css,js,svg,png,jpeg}).
Tips
- Keep assets in
src/assets/to match the defaults. - Pair with the PostCSS/esbuild modules for processing
src/assets/css/index.cssandsrc/assets/js/index.js. - See the “Assets Pipeline” tutorial for a guided setup.
- Tutorial: Assets Pipeline Quickstart
Previous: Modules
Next: assets-esbuild