You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to use ndashes in my page titles. In the content of the post a double hyphen -- is automatically converted by markdownify. Since titles are not processed through markdownify the double hyphen is preserved.
Is there a reason not to apply markdownify to titles? If there is not I will open a pull-request with my suggested changes. :)
The text was updated successfully, but these errors were encountered:
The main reason should be that titles will be used in a bunch of places expecting plain text, e.g. the page's <title> tag. And while Hugo's plainify function can strip out HTML tags, it won't turn HTML entities into their plain text equivalent. So you'll end up with – displayed as text in the page title...
closesreuixiy#179
* First approach to markdownify title
* refactor: use title.html
* apply htmlUnescpae to title and rawTitle
Co-authored-by: reuixiy <[email protected]>
I want to use ndashes in my page titles. In the content of the post a double hyphen -- is automatically converted by markdownify. Since titles are not processed through markdownify the double hyphen is preserved.
Is there a reason not to apply markdownify to titles? If there is not I will open a pull-request with my suggested changes. :)
The text was updated successfully, but these errors were encountered: