I’m trying to set up a website with the Academic theme, following the tutorial. I’ve tried about 3 different ways of getting a “Hello world,” running, including trying to run hugo on their pre-built websites, and manually adding the theme to a freshly-created website. Every time, I get the same error:
panic: BUG: Expected valid escape code after , but got ‘W’.
[recovered]
panic: BUG: Expected valid escape code after , but got ‘W’.
Following this is a very long Go stack trace, containing absolutely no information about what file is causing this error.
What does this error mean, and how can I get a basic webpage running?
I was writing a tool to mass-analyze Hugo themes and sites, and it pointed out an error with your theme.toml file. The two description fields have literal strings, but according to the spec, literal strings enclosed by one single-quote character cannot have newlines in them. See https://github.com/toml-lang/toml/blob/master/README.md#user-content-string.
You can make your strings legal like this:
description = '''
<!--[-->A fully responsive site template designed by <a href="https://html5up.net">HTML5 UP</a> and >released<!--]--><br />
<!--[-->for free under the <a href="https://html5up.net/license">Creative Commons</a> license.<!--]-->'
[…]
Really trivial, and I’m guessing the Hugo TOML parser accepts this syntax, but it’s best to follow the standard.