Search by

flexext / craft-article-reader-ux

flexext-dev

Automatic Table of Contents (H2-H4 anchor injector), Reading Time Estimator, Sticky Scroll Reading Progress Bar, and Article Schema.org JSON-LD for Craft CMS 4 & 5.

Package info

github.com/flexext-dev/craft-article-reader-ux

Documentation

Type:craft-plugin

pkg:composer/flexext/craft-article-reader-ux

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.2 2026-12-01 16:00 UTC

This package is auto-updated.

Last update: 2026-12-01 16:02:35 UTC


README

Automatic H2-H4 Table of Contents with unique anchor IDs, accurate multi-language Reading Time calculator, Sticky Scroll Reading Progress Bar, 1-click Copy Heading Links, and Schema.org Article JSON-LD for Craft CMS 4.5+ & 5.x — zero jQuery, WCAG 2.2 AA Light & Dark mode contrast verified.

Included Features (Single Standard Edition)

  • Twig Filters & Variable: {{ entry.body | injectToc }}, {{ entry.body | readingTime }}, {{ craft.articleUx.toc(entry.body) }}, and {{ craft.articleUx.readingTime(entry.body) }}.
  • UTF-8 Safe DOMDocument Anchor Injector: Automatically adds unique slugified id="..." anchors to H2–H4 headings with deduplication for repeated titles.
  • Sticky Scroll Reading Progress Bar: {{ craft.articleUx.progressBar() }} — passive scroll listener, zero CLS, respects prefers-reduced-motion.
  • 1-Click Copy Heading Links & Article Schema: Clickable # anchor links + {{ craft.articleUx.articleSchema(entry, entry.body) }} outputting Schema.org Article JSON-LD with wordCount & ISO 8601 timeRequired.

Installation

composer require flexext/craft-article-reader-ux
php craft plugin/install article-reader-ux

Requirements

  • Craft CMS 4.5+ or 5.0+
  • PHP 8.1 - 8.4 (with ext-dom / ext-libxml)