Error building site: failed to render pages: render of
“home” failed: execute of template failed: html/template:index.html: “”" in unquoted attr: “\u200b"en-US”\u200b"
I am new to Hugo.
Error building site: failed to render pages: render of
“home” failed: execute of template failed: html/template:index.html: “”" in unquoted attr: “\u200b"en-US”\u200b"
I am new to Hugo.
\u200b is a zero-width space.
Please share your project repository so that we can have a closer look.
See https://discourse.gohugo.io/t/requesting-help/9132
Let us see your code
Include a link to the source code repository of your project, because we really need the context of seeing your templates and partials to be able to help you. It is trivial to do a quick
git clone
on your repo, then runhugo server
in your project, to help you out. On the other hand, recreating your code from screenshots, or sort of guessing at it, is not.If you can’t share your repository for whatever reason, consider creating a dummy repo that you can share, which reproduces the problem you’re experiencing.
Please see below
PS D:\hugo\portfolio> hugo env
hugo v0.87.0-B0C541E4+extended windows/amd64 BuildDate=2021-08-03T10:57:28Z VendorInfo=gohugoio
GOOS=“windows”
GOARCH=“amd64”
GOVERSION=“go1.16.5”
PS D:\hugo\portfolio> git version
git version 2.28.0.windows.1
PS D:\hugo\portfolio> ls
The layouts/index.html is littered with unprintable characters. This is not a Hugo problem.
From the Windows command prompt:
type layouts/index.html
<!DOCTYPE html>ΓÇï
​  <html lang=​"en-US"​>
​ 
<head>
​ 
<meta charset=ΓÇï"utf-8"ΓÇï>
​  <title>{{ .Site.Title }}</title>
​ 
</head>
​ 
<body>
​ 
​  <h1>{{ .Site.Title}}</h1>
​ 
​  {{ .Content }}
​ 
​  </body>
​ 
</html>
Thank you! I am not sure what happened there, but I re-wrote the code and it works fine.
Thank you again.
Cheers,
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.