Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nhoizey/eleventy-plugin-pack11ty
An heavily opinionated set of filters, shortcodes, transforms, collections for Eleventy, linked to the Pack11ty template project
https://github.com/nhoizey/eleventy-plugin-pack11ty
eleventy eleventy-plugin plugin
Last synced: 4 months ago
JSON representation
An heavily opinionated set of filters, shortcodes, transforms, collections for Eleventy, linked to the Pack11ty template project
- Host: GitHub
- URL: https://github.com/nhoizey/eleventy-plugin-pack11ty
- Owner: nhoizey
- License: mit
- Created: 2023-03-12T16:29:07.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-08T02:34:28.000Z (10 months ago)
- Last Synced: 2024-04-08T03:36:58.405Z (10 months ago)
- Topics: eleventy, eleventy-plugin, plugin
- Language: JavaScript
- Homepage: https://pack11ty.dev
- Size: 1.67 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# [ [Pack11ty](https://pack11ty.dev) ] `eleventy-plugin-pack11ty`
[![npm](https://img.shields.io/npm/v/eleventy-plugin-pack11ty?logo=npm&style=for-the-badge)](https://www.npmjs.com/package/eleventy-plugin-pack11ty)
[![npm](https://img.shields.io/npm/dw/eleventy-plugin-pack11ty?style=for-the-badge&logo=npm)](https://www.npmjs.com/package/eleventy-plugin-pack11ty)
[![GitHub stars](https://img.shields.io/github/stars/nhoizey/eleventy-plugin-pack11ty.svg?style=for-the-badge&logo=github)](https://github.com/nhoizey/eleventy-plugin-pack11ty/stargazers)
[![Follow @[email protected]](https://img.shields.io/mastodon/follow/000262395?domain=https%3A%2F%2Fmamot.fr&style=for-the-badge&logo=mastodon&logoColor=white&color=6364FF)](https://mamot.fr/@nhoizey)[Pack11ty](https://pack11ty.dev) is an heavily opinionated **[Eleventy](https://www.11ty.dev/) starter** (aka "template project").
`eleventy-plugin-pack11ty` is an Eleventy plugin containing a set of filters, shortcodes, transforms and plugins for Eleventy, used in the Pack11ty starter, but also usable in any other Eleventy project.
Feel free to use it, enhance it, and share your ideas/comments with [issues](https://github.com/nhoizey/eleventy-plugin-pack11ty/issues/new/choose), or (even better) [pull requests](https://github.com/nhoizey/eleventy-plugin-pack11ty/compare).
## Installation
You can either use the [Pack11ty](https://pack11ty.dev) starter, or install the plugin into your existing Eleventy project:
```shell
npm install --save-dev eleventy-plugin-pack11ty
```Then, in your Eleventy configuration file (usually `.eleventy.js` or `eleventy.config.js`), load the plugin as follows:
```js
const pack11tyPlugin = require('eleventy-plugin-pack11ty');module.exports = function (eleventyConfig) {
eleventyConfig.addPlugin(pack11tyPlugin);
};
```## Usage
### Options
You can set some options for the plugin to activate and configure some [transforms](#transforms).
Change the previous code to this and replace the `false` values as you wish:
```js
const pack11tyPlugin = require('eleventy-plugin-pack11ty');module.exports = function (eleventyConfig) {
eleventyConfig.addPlugin(pack11tyPlugin, {
responsiver: false,
minifyHtml: false,
});
};
```| **Option name** | **Description** | **Value** |
| --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `responsiver` | Transform simple `` images into responsive images with `srcset`/`sizes` attributes with [eleventy-plugin-images-responsiver](https://nhoizey.github.io/eleventy-plugin-images-responsiver/). | `false` (default) or an object with multiple keys. See details in the Tranforms section below. |
| `minifyHtml` | Minify the HTML after building pages. Recommended for a production build only. | `false` (default) or `true` |### Filters
#### Arrays
#### Strings
#### HTML
### Nunjucks shortcodes
### Paired shortcode
### Transforms
#### Responsive images
#### Minify HTML
### Included plugins
## Would you like to know more?
Read the full documentation on [pack11ty.dev](https://pack11ty.dev/)!