Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jgarber623/eleventy-plugin-template
A template repository for creating Eleventy plugins.
https://github.com/jgarber623/eleventy-plugin-template
11ty 11ty-plugin eleventy eleventy-plugin template template-repository
Last synced: 2 days ago
JSON representation
A template repository for creating Eleventy plugins.
- Host: GitHub
- URL: https://github.com/jgarber623/eleventy-plugin-template
- Owner: jgarber623
- License: mit
- Created: 2024-02-23T14:04:53.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-01-11T03:13:49.000Z (about 1 month ago)
- Last Synced: 2025-01-30T21:34:06.186Z (11 days ago)
- Topics: 11ty, 11ty-plugin, eleventy, eleventy-plugin, template, template-repository
- Language: JavaScript
- Homepage: https://jgarber623.github.io/eleventy-plugin-template/
- Size: 208 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# eleventy-plugin-template
> [!NOTE]
> **Thanks for using this template!** You'll first want to find-and-replace instances of `eleventy-plugin-template`, `templatePlugin`, and `An Eleventy plugin for…`. If you're not me, you'll also want to update author information in `package.json` and `LICENSE`, replace instances of `jgarber` and `jgarber623`, and update a bunch of URLs.
>
> Once you've done all that, you can remove this note and starting building your Web Component.**An [Eleventy](https://www.11ty.dev) plugin for…**
[![npm](https://img.shields.io/npm/v/@jgarber/eleventy-plugin-template.svg?logo=npm&style=for-the-badge)](https://www.npmjs.com/package/@jgarber/eleventy-plugin-template)
[![Downloads](https://img.shields.io/npm/dt/@jgarber/eleventy-plugin-template.svg?logo=npm&style=for-the-badge)](https://www.npmjs.com/package/@jgarber/eleventy-plugin-template)
[![Build](https://img.shields.io/github/actions/workflow/status/jgarber623/eleventy-plugin-template/ci.yml?branch=main&logo=github&style=for-the-badge)](https://github.com/jgarber623/eleventy-plugin-template/actions/workflows/ci.yml)## Usage
First, add the plugin as [a development dependency](https://docs.npmjs.com/cli/configuring-npm/package-json#devdependencies) to your project's `package.json` file:
```sh
npm install --save-dev @jgarber/eleventy-plugin-template
```Next, add the plugin to your project's [Eleventy configuration file](https://www.11ty.dev/docs/config#default-filenames) (e.g. `eleventy.config.js`):
```js
module.exports = function(eleventyConfig) {
eleventyConfig.addPlugin(require("@jgarber/eleventy-plugin-template"));
};
```## Options
## ESM Support
Eleventy v3.0.0 [added bundler-free ESM support](https://www.11ty.dev/blog/canary-eleventy-v3). This plugin works with either ESM or CommonJS projects!
```js
import templatePlugin from "@jgarber/eleventy-plugin-template";export default async function(eleventyConfig) {
eleventyConfig.addPlugin(templatePlugin);
}
```## Acknowledgments
First and foremost, eleventy-plugin-template wouldn't be possible without [Zach Leatherman](https://www.zachleat.com)'s incredible work creating Eleventy and his stewardship of its community.
eleventy-plugin-template is written and maintained by [Jason Garber](https://sixtwothree.org).