mataroa
mataroa copied to clipboard
Hugo export breaks if post title has quotes in it
I wanted to play around with the Hugo export for my blog, but Hugo kept failing to build my exported files. Turns out this is happening for me because I have a post with the title The theory of "oh thank god"
.
As a result of the quotation marks, the markdown export of the post is broken. The title in the markdown export should be "The theory of \"oh thank god\""
but the mataroa export sets it to "The theory of "oh thank god""
.
Hey @pratul!
Nice, thanks for reporting this.
I have just pushed a fix in 61d451403db16790947b49d5788299583e44d14e. Could you please let me know if that works as expected now?
Yes, works correctly now!
However, there's another issue that still breaks the Hugo export: support for {{ .RSSLink }}
has been removed from the templating engine. It is being used in the baseof.html
file of the mataroa theme.
>: hugo serve
Start building sites …
hugo v0.110.0+extended darwin/arm64 BuildDate=unknown
ERROR 2023/03/03 22:39:01 render of "page" failed: "/Users/pratul/Downloads/export-hugo-8d54a846/themes/mataroa/layouts/_default/baseof.html:16:23": execute of template failed: template: _default/single.html:16:23: executing "_default/single.html" at <.RSSLink>: can't evaluate field RSSLink in type *hugolib.pageState
ERROR 2023/03/03 22:39:01 render of "page" failed: "/Users/pratul/Downloads/export-hugo-8d54a846/themes/mataroa/layouts/_default/baseof.html:16:23": execute of template failed: template: _default/single.html:16:23: executing "_default/single.html" at <.RSSLink>: can't evaluate field RSSLink in type *hugolib.pageState
ERROR 2023/03/03 22:39:01 render of "page" failed: "/Users/pratul/Downloads/export-hugo-8d54a846/themes/mataroa/layouts/_default/baseof.html:16:23": execute of template failed: template: _default/single.html:16:23: executing "_default/single.html" at <.RSSLink>: can't evaluate field RSSLink in type *hugolib.pageState
ERROR 2023/03/03 22:39:01 render of "page" failed: "/Users/pratul/Downloads/export-hugo-8d54a846/themes/mataroa/layouts/_default/baseof.html:16:23": execute of template failed: template: _default/single.html:16:23: executing "_default/single.html" at <.RSSLink>: can't evaluate field RSSLink in type *hugolib.pageState
Error: Error building site: failed to render pages: render of "page" failed: "/Users/pratul/Downloads/export-hugo-8d54a846/themes/mataroa/layouts/_default/baseof.html:16:23": execute of template failed: template: _default/single.html:16:23: executing "_default/single.html" at <.RSSLink>: can't evaluate field RSSLink in type *hugolib.pageState
Built in 6 ms
- issue related to deprecation: https://github.com/gohugoio/hugo/issues/4427
- current docs for referencing the RSS feed in
<head>
: https://gohugo.io/templates/rss/#reference-your-rss-feed-in-head
@sirodoht may we close this in favor of #66?
Sure!