chipzoller / hugo-clarity

A theme for Hugo based on VMware Clarity
Other
577 stars 262 forks source link

Remove config suffix from image alt attribute text #408

Closed christosle closed 1 year ago

christosle commented 1 year ago

The configuration suffix that is appended to an image's alt attribute text (to inline, float, add custom classes etc. to the image) is not removed after being used. See the attached screenshot.

Pull Request type

Please check the type of change your PR introduces:

Current state

Issue Number(s):

Proposed changes

In the populateAlt(images) function the extra information is removed from alt, but the clean alt text is not persisted back to the image element.

Persist the modified/clean alt text to the image element with:

image.alt = alt

Screenshots, if applicable

img-alt-issue

Checklist