How to Escape Double-Quotes in part of a Title?

Hi,

I’m migrating my wordpress tech blog to Hugo, and am running into the following issue.

Some of my Post Titles have quoted strings. Ex: “Facebook Obsession” CNBC Documentary Airs This Thursday

The migration tool migrated the post to .md as follows.

When I do a 'hugo server` on this, I get the following error.

I did try what in this post Does not work the escape character “\” in title as follows.

title: "\"Facebook Obsession\"" CNBC Documentary Airs This Thursday

This also gives the same error. It looks like escaping double quotes as shown in that answer by @moorereason only works if the entire title is quoted, not if part of the title is quoted.

I also tried several combinations of \, single quotes `` and double double quotes i.e.“” and none of them worked.

Worst case scenario I can remove the quotes, but I would really like to know if there is a solution to including double quotes in part of a title in the YAML front matter for a Hugo post.

Thank you!
-Shiva

See here:

http://www.yaml.org/spec/1.2/spec.html#id2760844

I mostly use this if I want multiple lines, but it also allows quotes:

http://www.yaml.org/spec/1.2/spec.html#id2795688

1 Like

Thanks @bep! You are awesome!.

I looked at that doc, and the following works!! i.e. single quote at the beginning and end of the title.

title: '"Facebook Obsession" CNBC Documentary Airs This Thursday'

1 Like