Skip to content
This repository has been archived by the owner on Mar 10, 2023. It is now read-only.
/ eleventy-assets Public archive

Code-split your CSS in Eleventy.

Notifications You must be signed in to change notification settings

11ty/eleventy-assets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Eleventy Assets

⚠️ This utility is retired and superseded by the Eleventy Bundle Plugin.


Code to help manage assets in your Eleventy project. This is not an addPlugin compatible Eleventy plugin. It is an npm package for use in your config or other plugins.

Currently supported features:

  • Generate and inline code-split CSS specific to individual pages.
  • Can work as a standalone implementation (check out the ./sample/ directory) or in tandem with eleventy-plugin-vue.

Installation

npm install @11ty/eleventy-assets

Usage

See the ./sample/ directory for an example implementation.

  • A usingComponent shortcode to log component use in each template.
  • A getCSS filter for use in layout templates to output the code-split CSS for the current URL (only).
  • Component CSS is stored in ./sample/css/