An open API service indexing awesome lists of open source software.

https://github.com/netlify/esi-edge-function


https://github.com/netlify/esi-edge-function

Last synced: 4 months ago
JSON representation

Awesome Lists containing this project

README

        

# ESI Edge Function

This is a simple implementation of the basic tag, with an edge function.

Let's you use includes from a HTML file:

```


Testing ESI Includes


Testing ESI Includes


Testing ESI Includes



```

Currently requires the includes to live under the `/includes/` path prefix to avoid running the edge function both for the main HTML and each include.

The ESI stiching happens behind Netlify's edge cache, so the resulting document is cached after being stiched together.

To change this behavior (in case your includes are dynamic and need a cache lift cycle that's independent from the main HTML) remove the `cache: "manual"` setting from the `config` exported from `netlify/edge-functions/esi.ts`.