Error calling partial: "\"" in attribute name: "\" "

Greetings Hugonauts,
I’m climbing the learning curve of Hugo and have installed and examined a lot of themes and am now (after about 6 months) trying to convert an HTML Bootstrap template to Hugo. I’ve learned the basics of git, and am using NPM to install packages and run scripts. So I feel a BIT less like a newbie these days. Currently running Hugo v0.98.0+extended on Windows. But I’ve been pounding my head this morning on this one (that happens for both local development and building:

error calling partial: execute of template failed: html/template:partials/head.html: "\"" in attribute name: "\" "

I’ve searched Discourse and found where answers were given that sound applicable:

Post a link to your git repo so that we can help you troubleshoot this.
My hunch is that there is a \ where a / should be, but that’s just a guess.

Well, that was my guess also, but using Notepad++ to search the entire project I can’t find anything. Is it possible this is related to an invisible linebreak character? I did get this warning when doing my git add --all:

warning: CRLF will be replaced by LF in postcss.config.js.
The file will have its original line endings in your working directory

That warning was on every file I added.

Not sure if that is relevant. I did make the repository Public, if anyone has any ideas:

Thanks in advance for any assistance!

First, you are missing the closing quotation mark around the href attribute:

Second, you need to mount the default assets directory in your site configuration:

source = "assets"
target = "assets"


When you add a mount, the default mount for the concerned target root is ignored: be sure to explicitly add it.

Thank you so much Joe. If Hugo ever has a Mount Rushmore, I’m sure your face will be on it!

So much for trusting bep’s code without examining it carefully. He forgot the closing quotation mark in the code I copied. :wink:

Thanks also for clarifying that if you use mounts (at all) then you need to specify everything. I thought that “assets” was the assets directory by default and did not realize ALL of those default folders need to be specified as mounts. Thanks for the link to the applicable documentation!

Appreciate the prompt answer!

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.