0.1.0 • Published 1 year ago

@jgarber/eleventy-plugin-routes v0.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

eleventy-plugin-routes

An Eleventy plugin for generating /resource-style URLs.

npm Downloads

This plugin implements the example code from the Eleventy permalinks documentation. The section, "Removing trailing slashes," details the trade-offs and deployment concerns in using the configuration supplied by this plugin.

Usage

First, add the plugin as a development dependency to your project's package.json file:

npm install --save-dev @jgarber/eleventy-plugin-routes

Next, add the plugin to your project's Eleventy configuration file (e.g. eleventy.config.js):

import eleventyPluginRoutes from "@jgarber/eleventy-plugin-routes";

export default async function(eleventyConfig) {
  eleventyConfig.addPlugin(eleventyPluginRoutes);
}

šŸ† That's it! Your Eleventy project should now default to generating resource.html-style pages and return /resource-style URLs from page.url entries.

Acknowledgments

First and foremost, eleventy-plugin-routes wouldn't be possible without Zach Leatherman's incredible work creating Eleventy and his stewardship of its community.

eleventy-plugin-routes is written and maintained by Jason Garber.

0.1.0

1 year ago