@bradleyburgess/eleventy-plugin-img-figcaptions

1.0.2 • Public • Published

eleventy-plugin-img-figcaptions

Table Of Contents

Overview

This Eleventy plugin is a wrapper around @bradleyburgess/img-figcaptions to add semantic HTML captions using plain-text "Caption: " blocks.

Installation

NPM:

npm i -D @bradleyburgess/eleventy-plugin-img-figcaptions

Yarn:

yarn add -D @bradleyburgess/eleventy-plugin-img-figcaptions

Usage

Add the plugin to your Eleventy config. For options for the transformer, see the @bradleyburgess/img-figcaptions readme.

// .eleventy.js or your Eleventy config
const imgFigcaptions = require("@bradleyburgess/img-figcaptions");

module.exports = function (eleventyConfig) {
  eleventyConfig.addPlugin(imgFigcaptions);
  // ... rest of your config
};

You can pass options to img-figcaptions:

const options = {
  imgFigcaptionsOptions: {
    removeTitle: false,
    replaceEmptyParagraph: true,
  },
};

module.exports = function (eleventyConfig) {
  eleventyConfig.addPlugin(imgFigcaptions, options);
  // ... rest of your config
};

Roadmap

There is currently no customization to the Eleventy side of the plugin. But some features that might be added in the future:

  • [ ] Allow exclusion of input paths
  • [ ] Allow exclusion of output paths

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    1
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i @bradleyburgess/eleventy-plugin-img-figcaptions

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

4.04 kB

Total Files

5

Last publish

Collaborators

  • bradleyburgess