A shrinkwrapped copy of the original Eleventy Edge plugin.
The original Eleventy Edge plugin enabled easy integrations with Netlify Edge Functions. This plugin was removed from the Eleventy bundle with v3.0 and is no longer an official plugin.
At the time of this writing, the original plugin code was not easily available. This repo contains a drop-in "shrinkwrapped" copy of the code.
Please note:
- This plugin is currently unmaintained (as was the original)
- Tested with Eleventy 3.0.0.
- Compatibility with newer versions is not guaranteed.
- Install the Netlify CLI (if you haven't already)
- Download the latest ZIP or tarball and decompress it
- copy the
11ty-edge
folder to your Eleventy folder - Add the plugin to your
.eleventy.js
configuration:
const EleventyEdgePlugin = require("./11ty-edge/");
module.exports = function(eleventyConfig) {
eleventyConfig.addPlugin(EleventyEdgePlugin);
};
- Run
netlify dev
. This will create aneleventy-edge
edge function. - Assign routes to the edge function in your
netlify.toml
file.
[[edge_functions]]
function = "eleventy-edge"
path = "/some/route/"
See the original documentation on how to use the plugin to create dynamic content.
There are other ways to integrate with Edge Functions, but being able to drop in the original code was a quick way to get it.
Also, I'm lazy.
I'm lazy.
Scott Andrew LePera, 2025-01-26
scottandrew.com
[email protected]