In which file do I need to change if I want to add an html comment on the startpage of localhost:1313? I have tried list.html and single.html inside themes/hugo-theme-nix/layouts/_default. I have also tried index.html in themes/hugo-theme-nix/layouts.
I tried: {{ /* something here */ }} but then I get error: /themes/hugo-theme-nix/layouts/index.html:10:1" : parse failed: template: index.html:10: unexpected “/” in command
If I do: {{ printf "<!-- comment here -->" }} , it prints the comment <!--comment--> but not in source-code but on actual page.
If I do: {{ <!-- comment here--> | safeHTML }} , I get: Error themes/hugo-theme-nix/layouts/index.html:10:1" : parse failed: template: index.html:10: unexpected “<” in command
I solved it now with quotes around it: {{ "<!-- comment here-->" | safeHTML }} . Thanks for the help!