@11ty/eleventy-assets 中文文档教程
Eleventy Assets
⚠️ 工作进行中!!
帮助管理 Eleventy 项目资产的代码。 这不是 addPlugin
兼容的 Eleventy 插件。 它是一个用于您的配置或其他插件的 npm 包。
当前支持的功能:
- Generate and inline code-split CSS specific to individual pages.
- Can work as a standalone implementation (check out the
./sample/
directory) or in tandem witheleventy-plugin-vue
.
Installation
npm install @11ty/eleventy-assets
Usage
请参阅 ./sample/
目录以获取示例实现。
- 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/
Eleventy Assets
⚠️ Work in progress!!
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 witheleventy-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/