Socket
Book a DemoInstallSign in
Socket

@11ty/eleventy-plugin-ejs

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@11ty/eleventy-plugin-ejs

The `ejs` template language plugin for Eleventy v3 and newer.

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
0
Created
Source

@11ty/eleventy-plugin-ejs

Adds support for .ejs (Embedded JavaScript templates) files in Eleventy v3.0 and newer. Support for ejs was moved out of core as part of Project Slipstream.

Installation

npm install @11ty/eleventy-plugin-ejs

Add to your configuration file (ESM version shown):

import ejsPlugin from "@11ty/eleventy-plugin-ejs";

export default function (eleventyConfig) {
	eleventyConfig.addPlugin(ejsPlugin);
}

Use more ejs options (full options list):

import ejs from "ejs";
import ejsPlugin from "@11ty/eleventy-plugin-ejs";

export default function (eleventyConfig) {
	eleventyConfig.addPlugin(ejsPlugin, {
		async: false, // default

		// use <? ?> instead of <% %>
		delimiter: "?",

		// Override the `ejs` library instance
		eleventyLibraryOverride: ejs,
	});
}

FAQs

Package last updated on 26 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts