Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eleventy-xml-plugin

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eleventy-xml-plugin

Useful set of Liquid filters for XML files composition in Eleventy projects

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
221
increased by9.41%
Maintainers
1
Weekly downloads
 
Created
Source

eleventy-xml-plugin

Build Status

👩‍🔬 Useful set of Liquid filters for XML files composition in Eleventy projects.

This plugins automatically adds a set of filters that Jekyll adds to the already built-in ones in Liquid template language to help you compose XML files like RSS feeds or sitemaps.

Install

# npm
npm i eleventy-xml-plugin --save

# yarn
yarn add eleventy-xml-plugin

Add plugin

Include it as a plugin in your Eleventy project.

// .eleventy.js
const xmlFiltersPlugin = require('eleventy-xml-plugin')

module.exports = function(eleventyConfig) {
  eleventyConfig.addPlugin(xmlFiltersPlugin)
}

Filters

date_to_rfc822

Used in RSS feed as a valid publish date format.

<pubDate>{{ post.date | 'date_to_rfc822' }}</pubDate>

date_to_xmlschema

Used in sitemaps as valid last modified date format.

<lastmod>{{ page.date | 'date_to_xmlschema' }}</lastmod>

xml_escape

Used to safely escape HTML entities in XML files.

<title>{{ post.data.title | 'xml_escape' }}</title>

This filter uses the html-entities package under-the-hood.

Contributing

To contribute Node.js and yarn are required.

Before commit make sure to follow conventional commits specification and check all tests pass by running yarn test.

Keywords

FAQs

Package last updated on 12 Jul 2019

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc