1.0.3 • Published 7 months ago

eleventy-first-image-plugin v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
7 months ago

Eleventy First Image Plugin

A simple Eleventy plugin to extract the first image from a post.

Installation

Install the plugin via npm:

npm install eleventy-first-image-plugin

Usage

Add the plugin to your .eleventy.js configuration file:

import firstImagePlugin from "eleventy-first-image-plugin";

export default function (eleventyConfig) {
  eleventyConfig.addPlugin(firstImagePlugin);
}

Then use the {% first_image %} shortcode in your templates to extract the first image:

{% first_image post %}

This will return the first image from the post's content.

1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago