Scan your whole stack
From OX Research Newsroom
Are you using eleventy-plugin-edgejs?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v1.2.1
eleventy-plugin-edgejs was last scanned on 26 Nov 2026 at version 1.2.1. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 1.2.1 LATEST | 26 Nov 2026 | No rules fired |
| 1.2.0 | 17 Nov 2026 | No rules fired |
| 1.1.34 | 17 Nov 2026 | No rules fired |
| 1.1.33 | 17 Nov 2026 | Not shown |
| 1.1.31 | 3 Nov 2026 | Not shown |
Findings for v1.2.1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 1.2.1; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
An Eleventy plugin that adds support for Edge.js templates. Edge.js is a modern, async-first templating engine from the AdonisJS team.
Requires Eleventy v3.0.0+ and Node.js 22+.
npm install eleventy-plugin-edgejs
[!TIP] This repository includes a working Eleventy site with more template and syntax examples. Browse the example source or see the Example Site section for instructions on running it locally.
Register the plugin in your Eleventy config file:
import edgeJsPlugin from "eleventy-plugin-edgejs";
export default function ( eleventyConfig ) {
eleventyConfig.addPlugin( edgeJsPlugin );
}
Create .edge files in your project and they'll be processed by Edge.js automatically.
eleventyConfig.addPlugin( edgeJsPlugin, {
// Reuse compiled components within a build (default: false)
cache: false,
// Provide your own Edge.js instance
eleventyLibraryOverride: undefined,
// Register global variables available in all templates
globals: {
siteName: "My Site"
}
} );
Eleventy universal filters and shortcodes are automatically bridged into Edge.js templates as global functions. Edge.js does not use a pipe syntax for filters — instead, call them as functions:
// eleventy.config.js
eleventyConfig.addFilter( "upcase", ( str ) => str.toUpperCase() );
eleventyConfig.addShortcode( "year", () => `${ new Date().getFullYear() }` );
{{-- In your .edge template --}}
<p>{{ upcase( name ) }}</p>
<p>© {{ year() }}</p>
Paired shortcodes also work as globals. The content is passed as the first argument.
Edge.js looks up page data before globals. If a page's data (front matter, directory data, or global data) has a key with the same name as a filter or shortcode, the data value wins inside that page and any layout it uses. For example, this front matter hides an image shortcode:
---
image: /images/cover.jpg
---
{{-- Fails with "image is not a function" --}}
{{{ await image( "/images/photo.jpg", "A photo" ) }}}
To fix it, rename either the data key or the shortcode (for example, coverImage or responsiveImage). When a call fails because page data hides a filter or shortcode, the plugin logs a warning with the page path and the path of the template, layout, or included partial where the call occurred.
Use double curly braces for escaped output and triple curly braces for raw (unescaped) output:
{{ title }}
{{{ rawHtml }}}
@if( user.isAdmin )
<p>Welcome, admin!</p>
@elseif( user.isMember )
<p>Welcome, member!</p>
@else
<p>Welcome, guest!</p>
@end
@unless( isLoggedIn )
<p>Please log in.</p>
@end
Ternary expressions work inline:
<p>{{ isActive ? "Active" : "Inactive" }}</p>
@each( item in items )
<li>{{ item }}</li>
@end
{{-- With index --}}
@each( ( item, index ) in items )
<li>{{ index }}: {{ item }}</li>
@end
{{-- Loop over object entries --}}
@each( ( value, key ) in object )
<dt>{{ key }}</dt>
<dd>{{ value }}</dd>
@end
{{-- Empty fallback --}}
@each( item in items )
<li>{{ item }}</li>
@else
<li>No items found.</li>
@end
Declare or reassign variables within a template:
@let( greeting = "Hello" )
<p>{{ greeting }}, World!</p>
@assign( greeting = "Hi" )
<p>{{ greeting }}, World!</p>
Include partial templates from your _includes directory. Edge.js @ tags must be on their own line:
<header>
@include( 'nav' )
</header>
{{-- Conditional include (renders only when condition is truthy) --}}
@includeIf( showSidebar, 'sidebar' )
Components live in _includes/components/. They provide a powerful alternative to template inheritance.
A component file (_includes/components/card.edge):
<div class="card">
<div class="card-body">{{{ await $slots.main() }}}</div>
</div>
Using the component:
@component( 'components/card' )
<p>This goes into the main slot.</p>
@end
A component with multiple slots (_includes/components/modal.edge):
<div class="modal">
<header>{{{ await $slots.header() }}}</header>
<main>{{{ await $slots.main() }}}</main>
@if( $slots.footer )
<footer>{{{ await $slots.footer() }}}</footer>
@end
</div>
Using named slots:
@component( 'components/modal' )
@slot( 'header' )
<h2>Modal Title</h2>
@end
@slot( 'main' )
<p>Modal content goes here.</p>
@end
@slot( 'footer' )
<button>Close</button>
@end
@end
Pass data to components as attributes:
{{-- _includes/components/button.edge --}}
<button class="{{ type }}">{{ text }}</button>
@component( 'components/button', { type: 'primary', text: 'Click me' } )
@end
{{-- Self-closing form --}}
@!component( 'components/button', { type: 'danger', text: 'Delete' } )
Edge.js comments are stripped from the output:
{{-- This comment will not appear in the HTML --}}
Prefix @ to output curly braces literally:
@{{ this will not be interpreted }}
Edge.js includes several built-in helpers:
{{-- CSS class builder --}}
<div class="{{ html.classNames( { active: isActive, hidden: !isVisible } ) }}"></div>
{{-- Truncate text --}}
<p>{{ truncate( longText, 20 ) }}</p>
{{-- Convert newlines to <br> tags --}}
{{{ nl2br( multiLineText ) }}}
Use ~ to remove trailing newlines from tag output:
@if( show )~
content
@end
Use Eleventy's built-in layout system with .edge files. Set the layout in front matter:
---
layout: layout.edge
title: My Page
---
<h1>{{ title }}</h1>
<p>Page content here.</p>
In your layout file (_includes/layout.edge):
<!DOCTYPE html>
<html>
<head>
<title>{{ title }}</title>
</head>
<body>
@include( 'nav' )
<main>{{{ content }}}</main>
</body>
</html>
This repository includes a working Eleventy site with more template and syntax examples. To run it locally:
git clone https://github.com/reverentgeek/eleventy-plugin-edgejs.git
cd eleventy-plugin-edgejs
pnpm install
pnpm start:example
This starts a local dev server so you can browse the examples and experiment with Edge.js templates.
MIT
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.