If I remove this code from my configuration file…
[markup.goldmark]
[markup.goldmark.extensions]
typographer = true
linkify = false
I get this error during hugo serve
and the build fails.
If I remove this code from my configuration file…
[markup.goldmark]
[markup.goldmark.extensions]
typographer = true
linkify = false
I get this error during hugo serve
and the build fails.
Did you not get this in the earlier Hugo releases?
I tested 0.93.2 and It also showed up. I have not tried the rest. (I was testing why my posts were still showing straight quotes despite the upgrade and this error occurred).
OK, I would need to see the failing Markdown to be able to fix this, I’m afraid.
Are you using a markdown render hook for links?
If yes, are you trying to pass .Text through markdownify
?
Yes! That’s the culprit! I use the hook to open external links in a new tab.
Do not pass .Text
through markdownify
.
The markdownify
function (which should be named htmlify) renders markdown to HTML. But the .Text
you receive in context in the render hook has already been rendered to HTML. This is sufficient:
{{ .Text | safeHTML }}
Alright! Thanks! Consider this solved. Now to the issue of the smart quotes not working…I guess I will need to open a new topic. (This is a Segoe UI problem)
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.