detect-wagtail

Detect whether a site or page is built with Wagtail

Usage no npm install needed!

<script type="module">
  import detectWagtail from 'https://cdn.skypack.dev/detect-wagtail';
</script>

README

Detect Wagtail

detect-wagtail on npm Build status Netlify Status

Detect whether a site or page is built with Wagtail.

Usage

You can run the detection with:

How it works

This uses regular expressions to check whether images on the page match a predetermined pattern. Here is a simplified diagram of the logic (created with regexper):

There can be false positives with such a simple check, but it has the benefit of working regardless of whether the target site is directly served by Wagtail, or if Wagtail is used as a headless CMS.

Related links