WordPress plugin that registers ASP Gutenberg blocks using ACF and Timber, and renders them with Frontend Twig macros.
See live examples of the underlying components, and guidance on when to use them, in the ASP Digital Design System.
$params array that matches the Frontend component API?nunjucks=true (used by design-system content export)acf-json/| Block | Frontend component |
|---|---|
| article-lead | Twig-only fallback |
| acronym | aspAcronym |
| block-list | aspSignage |
| card-list | aspCard |
| page-list | aspSignage |
| care-card | aspAction |
| contact-box | Twig-only fallback |
| cookie-settings | Cookie settings UI |
| details | aspAccordion |
| do-dont | aspNotification |
| hero | aspHero |
| info-box | aspNotification |
| search | aspSearchInput (HTML only; not exported) |
| steps | aspSteps |
| summary-list | aspSummaryList |
| table | aspTable |
timber/timber)policedigitalservices/asp-frontend via ComposerThe plugin looks for Composer packages in the WordPress root vendor/, the parent vendor/, then its own vendor/ directory.
Clone or place the plugin under wp-content/plugins/, then install dependencies from the WordPress project root (or the plugin directory if you maintain a local vendor tree):
git clone https://github.com/policedigitalservices/asp-wp-blocks.git
cd asp-wp-blocks
composer install
Activate WP Blocks and Advanced Custom Fields Pro in the WordPress admin. If ACF, Timber, or ASP Frontend are missing, the plugin shows an admin notice and exits early.
When ASP_CDN_URL and ASP_CDN_VERSION are defined, the plugin enqueues Frontend CSS/JS only if the theme has not already registered them. Editor canvas styles are loaded with add_editor_style() so they apply inside the writing iframe.
Block scripts (for example cookie-bar.js, toggle-button.js, table.js) are filterable via asp_blocks_frontend_scripts.
Runs in consuming WordPress sites.
> TODO: Add content.
> TODO: Add backlog, board, or related docs.