Eleventy Fetch

screenshot of Eleventy Fetch
eleventy

Eleventy Fetch

Utility to cache any remote asset: Image, Video, Web Font, CSS, JSON, etc

Overview

eleventy-fetch is a plugin for the Eleventy static site generator that allows users to fetch network resources and cache them at configurable intervals. This helps prevent overwhelming API or other resources with frequent requests, and also enables users to work offline if a successful request has been completed. It supports caching various types of assets such as JSON, HTML, images, videos, etc.

Features

  • Fetches network resources and caches them at configurable intervals
  • Helps prevent excessive requests to APIs or other resources
  • Enables offline work by utilizing successful requests

Installation

To install eleventy-fetch, you need to have Node version 14 or higher. Follow these steps:

  1. Open your command line interface.
  2. Run the following command to install eleventy-fetch:
npm install eleventy-fetch
  1. Once the installation is complete, you can import eleventy-fetch in your Eleventy project.

Summary

eleventy-fetch is a useful plugin for the Eleventy static site generator that allows users to fetch network resources and cache them, preventing excessive requests and enabling offline work. With easy installation and configuration options, this plugin provides a convenient solution for managing and caching assets in Eleventy projects.

eleventy
Eleventy

11ty is a static site generator that allows developers to build fast, modern websites using HTML, Markdown, and other templating languages, without the need for a complex build system.