rsquo

snippet to fix Hugo post title rendering

My posts for a while had the really annoying issue of rendering titles incorrectly for some unknown reason.

Apparently Goldmark, a Markdown parser that is used in Hugo, automatically replaces characters like ' (HTML code ’) with their HTML code counterparts:

[markup.goldmark.extensions.typographer]
    apostrophe = '’'
    disable = false
    ellipsis = '…'
    emDash = '—'
    enDash = '–'
    leftAngleQuote = '«'
    leftDoubleQuote = '“'
    leftSingleQuote = '‘'
    rightAngleQuote = '»'
    rightDoubleQuote = '”'
    rightSingleQuote = '’'

As seen in this snippet from their configuration, there's a flag to turn this off or off. I just added this flag to my hugo.toml file

[markup.goldmark.extensions.typographer]
    disable = true

and now we have the correctly rendered version! Yay!