Licence
AGPL-3.0-only
Version
1.1.4
Deps
18
Size
105 kB
Vulns
0
Weekly
0
@nexim/eleventy-config
Overview
An optimized, production-ready configuration for the Eleventy static site generator tailored for the Nexim APP Template structure. This setup ensures efficient Eleventy projects by integrating HTML minification, PostCSS processing, service worker generation, and other performance-focused enhancements for scalable and maintainable web applications.
Installation
Install the package using npm or yarn:
npm install @nexim/eleventy-config
# Or using yarn
yarn add @nexim/eleventy-config
API
eleventyConfiguration
Configures Eleventy with nexim app specification and html minify, postcss, workbox, etc.
// eleventy.config.mjs
import {eleventyConfiguration} from '@nexim/eleventy-config';
export default function (eleventyConfig) {
return eleventyConfiguration(eleventyConfig);
}
Returning the
eleventyConfigurationfunction is necessary to ensure the configuration is applied to the Eleventy instance.
eleventyCopyFontPlugin
Eleventy plugin to copy a font before the build process.
// eleventy.config.mjs
import {eleventyCopyFontPlugin} from '@nexim/eleventy-config';
export default function (eleventyConfig) {
eleventyConfig.addPlugin(eleventyCopyFontPlugin, {fontName: 'vazirmatn'});
// ...
}
TODO
- in the future, we will take the customization configuration from the User.
- Separate package for plugins.