Eleventy Plugin Webmentions screenshot

Eleventy Plugin Webmentions

Author Avatar Theme by Codefoodpixels
Updated: 22 Sep 2023
42 Stars

An eleventy plugin to fetch webmentions and helper methods to display them

Overview

The eleventy-plugin-webmentions is a powerful and innovative plugin designed for Eleventy, a popular static site generator. This tool allows users to fetch and filter webmentions effortlessly from Webmention.io, enhancing the interactivity and connectivity of their website. By integrating this plugin, developers can easily manage mentions from various sources, ensuring their content remains relevant and engaging.

With the ability to customize configurations to suit specific needs, the plugin provides a seamless experience for both developers and site visitors. Whether you’re looking to improve your site’s social proof or simply keep track of mentions across the web, this plugin allows you to do so with ease.

Features

  • Easy Installation: Quickly install the plugin via npm with a simple command, making it accessible for immediate use in your Eleventy projects.

  • Global Data Objects: The plugin adds two global data objects: webmentionsLastFetched, which tracks the last fetch date, and webmentions, an array of fetched webmention objects.

  • Flexible Filters: It provides two handy filters, webmentionsForPage and webmentionCountForPage, enabling you to retrieve webmentions and their counts based on specified types.

  • Custom Configuration Options: Users can define a set of configuration options such as domain, token, cache directory, and more, tailoring the plugin’s functionality to their specific requirements.

  • Mention Types: The plugin allows customization of mention categories, enabling you to filter webmentions based on various types like likes, reposts, and comments.

  • Sanitization Options: It integrates with sanitize-html, allowing you to define sanitization settings for safe content management.

  • Cache Management: The configurable cache directory and cache time options help improve performance by minimizing unnecessary API requests.

  • Support for Aliases: The plugin accommodates page aliases, allowing for effective management of redirected pages within your site.