Template: ... unterminated quoted string - caution

While editing a large number of files, I encountered an error with an unterminated quoted string.

I made some fairly dramatic changes to a bunch of files, and I was not running the Hugo server. When I started the server to check my progress, I discovered this error. Note that I had changed a couple of dozen files, and clearly I had made a careless typo.

INFO 2018/10/03 17:00:06 found taxonomies: 
map[string]string{"publication_type":"publication_types", "tag":"tags", "category":"categories"}

Total in 265 ms

Error: Error building site: Prepare pages failed: ["template: 
__03e4ac3c747b2606ce8f758562c04803:170: unterminated quoted string"]…

What concerns me about this error message is that it does not alert the user to the specific file(s) which have encountered the error. Is there a command or configuration option which will have Hugo provide more information?

[Note: a word of caution that one should run the Hugo server when making changes, to detect errors, to be able to isolate the cause of the error. One should also check files into git more often (sigh).]

I moved your topic to #support. I hope someone can help ya. :slight_smile:

1 Like