Skip to content

[content] Local dev (aem up) doesn't process :icon-name: syntax for DA content #2755

Description

@shsteimer

Is your feature request related to a problem? Please describe.

aem up serves DA-cloned content directly from content/, which holds raw, unprocessed HTML (the same format DA stores). helix-html-pipeline's rewrite-icons.js converts :icon-name: text to <span class="icon icon-name"> server-side for all content, but helix-cli has no local equivalent. So :icon-name: shows as literal text when previewing DA content locally, instead of the icon it renders as in production.

Describe the solution you'd like

Add a serve-time transform in HelixServer.js, alongside the existing page-metadata handling (content-metadata-html.js): :icon-name:<span class="icon icon-name">.

Prefer reusing @adobe/helix-html-pipeline's src/steps/rewrite-icons.js directly (small, pure HAST-in/HAST-out function) rather than hand-porting the regex. Not part of the package's public API, so this is an internal import; worth asking html-pipeline to export it officially.

Describe alternatives you've considered

Doing this in da-admin or as a pre-push processing step: rejected, since content/ should stay a byte-for-byte mirror of DA storage (confirmed via da-api.js, and DA's own prose2aem.js, which only applies this transform in its own livePreview mode).

Related: #2756 (same gap for section-metadata blocks).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions