-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tpl: Plainify .Title, .Description and .Summary for meta tags #9856
Conversation
Opengraph, Schema and Twitter expect Unicode strings without markup for their meta tags. The two new internal helper templates plain_title.html and plain_description.html generate them. The direct use of .Title, .Description and .Summary in the internal templates opengraph.html, schema.html and twitter_cards.html is replaced by those helper templates. Fixes #9818, #8698 and #8562
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! I've long wanted an internal template for the page description, used uniformly across other templates (like Twitter, etc). Being able to override these (esp. for the title) has been a need for some projects I work on. Thanks for the PR, I hope that this gets some traction soon.
tpl/tplimpl/embedded/templates/helpers/plain_description_or_summary.html
Outdated
Show resolved
Hide resolved
One more thought: consider splitting this into two PRs: one for the description update and one for the title update. I think that the title update might be more contentious, and I'd hate for that to delay the acceptance of the description part of this PR. My 2 cents. Cheers! |
This PR has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help. |
Opengraph, Schema and Twitter expect strings without markup for their meta tags. The two new internal helper templates plain_title.html and plain_description.html generate them. The direct use of .Title, .Description and .Summary in the internal templates opengraph.html, schema.html and twitter_cards.html is replaced by those helper templates.
Closes #9818
Closes #8698
Closes #8562 at least partially. .Summary is plainified, but there may still remain issues with the resulting formatting.