Sander's Blurbs

Menu

Tag: htmxpress

Introducing HTMXpress = HTMX for WordPress

I have recently been interested in using HTMX, but there’s not been any activity within the WordPress community as far as I can see. I hope to change that with HTMXpress (pronounced as HTM express).

HTMX allows you to annotate dynamic script style behaviour via custom HTML properties, using progressive enhancement. Perhaps you’re familiar with Hotwire (ruby on rails) or Intercooler.js (htmx predecessor).

The approach

By using the Rewrite Endpoints API to create a custom endpoint; and a bit of custom template logic, we can output a serverside partial or custom theme template.

Using this setup, WordPress can leverage HTML over the wire solutions such as HTMX.

HTMX then allows us to do dynamic serverside based rendering; live search and other features without the overhead and complexity of reactive JavaScript frameworks, whilst benefiting from trusted object and full page caching solutions.

Currently it’s a prototype. I’ll be blogging more about progress as things go on.