1.0.2 • Published 4 years ago
elite-four v1.0.2
elite four
An 11ty plugin that:
- Minimizes HTML, CSS, and JS, inlining the latter two
- Gives a few good Eleventy defaults
- Adds several liquid shortcodes, filters, and transforms
- Extends markdown-it's functionality
This plugin is built entirely based on my preference and my workflow, there is literally no built-in customization
Features:
Asset Processing
- Get image dimensions and inline them in order to prevent content shifting
- Inspired by LazyImages and Images, Correctly.
- Minimize HTML output using HTMLMinifier
- Automatically add
noopener noreferrer
to external links to make them safer
Eleventy Defaults
Liquid Extensions
- Variety of date filters
- Modified from Mark Thomas Miller's date fix
- URL Encoding
- Table of Contents
- Modified from eleventy-plugin-toc
Markdown Extensions
- markdown-it-anchor
- markdown-it-attrs
- A modified version of markdown-it-attribution
- A modified version of markdown-it-footnote
- markdown-it-image-figures
- markdown-it-mark
Usage
In your 11ty project:
npm i elite-four
then add this to your site's .eleventy.js (or equivalent):
const eliteFour = require('elite-four');
module.exports = function (eleventyConfig) {
eleventyConfig.addPlugin(eliteFour);
}