@jgarber/eleventy-plugin-routes

0.1.0 • Public • Published

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.

Package Sidebar

Install

npm i @jgarber/eleventy-plugin-routes

Weekly Downloads

6

Version

0.1.0

License

MIT

Unpacked Size

4.32 kB

Total Files

4

Last publish

Collaborators

  • jgarber