More Premium Hugo Themes Premium Eleventy Themes

Eleventy Assets

Code-split your CSS in Eleventy.

Eleventy Assets

Code-split your CSS in Eleventy.

Author Avatar Theme by 11ty
Github Stars Github Stars: 32
Last Commit Last Commit: Mar 10, 2023 -
First Commit Created: Aug 8, 2025 -
Eleventy Assets screenshot

Overview

Eleventy Assets is a utility designed for managing assets in your Eleventy projects. Although it’s been retired and replaced by the Eleventy Bundle Plugin, this npm package can still provide valuable functionalities for those looking to enhance their site’s asset management. With a focus on generating and inlining code-split CSS specifically tailored for individual pages, Eleventy Assets offers a straightforward implementation without the need for complex plugin setups.

This tool is particularly beneficial for developers working on Eleventy projects who want to efficiently manage their CSS assets. With its compatibility for standalone use or in conjunction with other Eleventy plugins, it provides flexibility and ease of integration.

Features

  • Code-Split CSS Generation: Automatically generates and inlines CSS specific to the pages in your project, optimizing loading times and resource management.
  • Standalone Implementation: Can be used independently or paired with other Eleventy plugins, providing versatility in how you manage project assets.
  • Usage Logging: Includes a component shortcode that helps you log component usage within your templates, offering insights into your project’s structure.
  • CSS Output Filter: Features a getCSS filter that outputs the code-split CSS relevant to the current URL, ensuring each page only loads necessary styles.
  • Sample Directory Provided: Comes with a sample directory that illustrates example implementations, making it easier for developers to understand and utilize the package.
  • Component CSS Organization: Stores component-specific CSS neatly in the designated ./sample/css/ directory, promoting organized asset management.