Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
eleventy-plugin-unified
Advanced tools
Use the unified ecosystem in Eleventy.
You can render and transform:
retext is not yet supported, raise an issue if you'd like this.
npm install eleventy-plugin-unified
// .eleventy.config.cjs
const EleventyUnifiedPlugin = require("eleventy-plugin-unified");
module.exports = function (eleventyConfig) {
eleventyConfig.addPlugin(EleventyUnifiedPlugin, [
"remark-slug", // Add [id] attributes to headings.
]);
};
npm install eleventy-plugin-unified remark-slug rehype-format unist-util-visit
// .eleventy.config.cjs
const EleventyUnifiedPlugin = require("eleventy-plugin-unified");
module.exports = function (eleventyConfig) {
eleventyConfig.addPlugin(EleventyUnifiedPlugin, {
transformsDirectory: "./plugins/",
markdownTransforms: ["aria-current-links.js", "remark-slug"],
htmlTransforms: [["rehype-format", { indent: "\t" }]],
});
};
// ./plugins/aria-current-links.js
import { join } from "node:path";
import { visit } from "unist-util-visit";
// If the link matches the current page set 'aria-current' to true
export default function ariaCurrentLinks() {
const {
pageContext: { page },
} = this.data();
return (tree) => {
visit(tree, ["link", "linkReference"], (node) => {
const url = node?.url;
if (url && join(page.filePathStem) !== join(url)) {
return;
}
node.data = {
...node.data,
hProperties: {
...node.data.hProperties,
"aria-current": "true",
},
};
});
};
}
// .eleventy.config.cjs
const EleventyUnifiedPlugin = require("eleventy-plugin-unified");
module.exports = function (eleventyConfig) {
eleventyConfig.addPlugin(EleventyUnifiedPlugin, [
markdownTransforms: [
'remark-emoji'
]
]);
};
// .eleventy.config.cjs
const EleventyUnifiedPlugin = require("eleventy-plugin-unified");
module.exports = function (eleventyConfig) {
eleventyConfig.addPlugin(EleventyUnifiedPlugin, [
htmlTransforms: [
'rehype-format'
]
]);
};
// .eleventy.config.cjs
const EleventyUnifiedPlugin = require("eleventy-plugin-unified");
module.exports = function (eleventyConfig) {
eleventyConfig.addPlugin(EleventyUnifiedPlugin, [
htmlTransforms: [
["rehype-format", { indent: "\t" }]
],
]);
};
// .eleventy.config.cjs
const EleventyUnifiedPlugin = require("eleventy-plugin-unified");
module.exports = function (eleventyConfig) {
eleventyConfig.addPlugin(EleventyUnifiedPlugin, [
markdownTransforms: [
"./plugins/responsive-tables.js"
],
]);
};
or
// .eleventy.config.cjs
const EleventyUnifiedPlugin = require("eleventy-plugin-unified");
module.exports = function (eleventyConfig) {
eleventyConfig.addPlugin(EleventyUnifiedPlugin, [
transformsDirectory: "./plugins",
markdownTransforms: [
"responsive-tables.js"
],
]);
};
npm install eleventy-plugin-unified unist-util-visit
// .eleventy.config.cjs
const EleventyUnifiedPlugin = require("eleventy-plugin-unified");
module.exports = function (eleventyConfig) {
eleventyConfig.addPlugin(EleventyUnifiedPlugin, {
transformsDirectory: "./plugins/",
markdownTransforms: ["log-data.js"],
});
};
// ./plugins/log-data.js
export default function logData() {
const { pageContext, eleventyConfig } = this.data();
console.log({ pageContext, eleventyConfig });
}
Inspired by florianeckerstorfer/eleventy-plugin-remark
FAQs
Use the unified ecosystem in Eleventy with remark and rehype.
We found that eleventy-plugin-unified demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.