Eleventy Plugin Blog Tools screenshot

Eleventy Plugin Blog Tools

Author Avatar Theme by Brob
Updated: 28 Aug 2022
52 Stars

A collection of shortcodes, filters and tags that make blogging on 11ty more fun

Overview:

Blog Tools for 11ty is a plugin that provides users with shortcodes and filters to assist in writing and organizing blog content. It offers features such as creating excerpts from pages, embedding YouTube and Vimeo videos, customizing CodePen embeds, and filtering collections based on specific criteria.

Features:

  • Excerpt: Creates an excerpt from a page with front matter and/or standard markdown. This can be done by using a singular <!-- excerpt --> tag in the markdown, specifying start and end points with HTML comments (<!-- excerpt start --> and <!-- excerpt end -->), or by specifying an excerpt property in the MD file’s frontmatter. If no excerpt is found, the first paragraph of the post will be used.
  • YouTube: Generates fluidly-responsive YouTube embed markup by providing a YouTube video ID.
  • Vimeo: Generates fluidly-responsive Vimeo embed markup by providing a Vimeo video ID.
  • CodePen: Customizes CodePen embeds by specifying various options, such as the URL, tabs to display, height in pixels, and theme.
  • Related Filter: Filters a collection based on parameters passed to the function. It allows users to filter a collection based on an array of items, a threshold integer, and an optional URL to exclude.

Installation:

To install the Blog Tools for 11ty plugin, follow these steps:

  1. Open your Eleventy config file (usually named .eleventy.js).
  2. Add the plugin to your config file by adding the following code snippet:
module.exports = function (eleventyConfig) {
  // Other config settings
  eleventyConfig.addPlugin(require('blog-tools-for-11ty'));
};
  1. Save the file and run your Eleventy build command to activate the plugin.

Summary:

Blog Tools for 11ty is a helpful plugin for anyone using the Eleventy static site generator for their blog. It provides useful features like creating excerpts, embedding videos from YouTube and Vimeo, customizing CodePen embeds, and filtering collections based on specific criteria. By integrating this plugin into their Eleventy setup, bloggers can enhance their writing and organization process.