Skip to content

fix: allow empty CoverCredit by removing default text#577

Open
tal4va wants to merge 1 commit intopanr:masterfrom
tal4va:master
Open

fix: allow empty CoverCredit by removing default text#577
tal4va wants to merge 1 commit intopanr:masterfrom
tal4va:master

Conversation

@tal4va
Copy link
Copy Markdown

@tal4va tal4va commented Mar 19, 2026

Allows users to set CoverCredit to an empty string to prevent the tooltip.

Hugo's default function treats an empty string "" as false value so it is impossible for a user to intentionally clear the tooltip. The default function overrides user's CoverCredit = "" and pastes title="Cover Image" in the <img> tag

With this change the title field will remain empty unless explicitly specified otherwise.

Allows users to set CoverCredit to an empty string to prevent the tooltip from appearing.
@panr
Copy link
Copy Markdown
Owner

panr commented Apr 5, 2026

It would be better to add a condition to set the title attribute only if someone actually want to set it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants