-
Notifications
You must be signed in to change notification settings - Fork 25.6k
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
Do not markdownify title - Fixes #3094 #3113
Conversation
You can add |
@iBug But why should the vertical bar | be escaped in the seo_title? If it needs replacing then the replace should probably take place on seo_title together with escape_once instead, as the user might use it as part of the title also. |
Well you're right. I couldn't find any necessity to escape the vertical bar. Maybe it was related to Markdown parsing where it would be interpreted as table (it trolled me once upon a time). Now that you've removed |
The For example check this test post on master. https://mmistakes.github.io/minimal-mistakes/markdown/markup-title-with-markup/ The title has a word italized and bolded, and the This PR breaks that. Now the |
A better fix might be to apply the Markdown and replace transforms on |
Thanks for the comments @iBug and @mmistakes. Here is a new stab on solving the issue. |
@lsolesen sorry for the delay on this, finally got around to testing it. Titles with markdown parse correctly now, but the "home" index.html page doesn't output a title now. There's an empty Will probably want to test a paginated home index as well as there's some logic to spit out page numbers in the title element. |
_layouts/single.html
Outdated
@@ -18,7 +18,7 @@ | |||
{% include sidebar.html %} | |||
|
|||
<article class="page h-entry" itemscope itemtype="https://schema.org/CreativeWork"> | |||
{% if page.title %}<meta itemprop="headline" content="{{ page.title | markdownify | strip_html | strip_newlines | escape_once }}">{% endif %} | |||
{% if page.title %}<meta itemprop="headline" content="{{ page_title }}">{% endif %} |
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.
I'm afraid page_title
as calculated in seo.html
won't propagate to here.
This reverts commit dfaac40.
* Do not markdownify title * Support markup in titles * Support markup in titles * Fix seo.html as reviewed * seo_title is now unconditionally computed --------- Co-authored-by: iBug <git@ibugone.com>
Title should not be markdownified. Pull request to fix gh-3094.
Summary
Context