I’m using latest version of hugo, I have head.html file, contains some meta, css files & other usual head content. when I try to include the partial on some html file (let’s say index.html) using {{ partial "head.html" . }}, the content injected to the page successfully, but there is an issue.
Hugo add some unknown character right after <body>, when I view Page source in browser, the head & body tag shows as red, that means there some problem, also I have margin on top on my page (because of that character), notice that I using some other partials in my page (in body tag) and they are fine, also if I don’t use partial for head section (repeat head tag in my page(s), everything works fine)
I didn’t worry if it was only visible on console, but as I said because of that character, I have margin in top of all my pages (like I added body: margin-top: 20px in my stylesheet), also if I try to view source of the page, the head and body tag shown as red, this means there is something wrong with HTML.
Also in dev tools, all meta & css link shown in body instead of head tag. I tired to use hugo instead of hugo server to see if this issue is exists only in memory, but it happened in final output too.
I just created new site (using hugo new site) and copy/paste all content from old one to new and the character gone! I don’t know why but everything is fine now.