Closed VaibhavSys closed 2 years ago
There are Hooks that provide the ability to add custom code on a page.
In this case, create a hook named layouts/partials/hooks/head-end.html
:
{{- if .IsHome -}}
<meta name="foo" content="bar">
{{- end -}}
I did it and I am getting this error:
Error: add site dependencies: load resources: loading templates: "/home/sparrow/cyborgstation-website/layouts/partials/hooks/head-end.html:3:1": parse failed: template: partials/hooks/head-end.html:3: unexpected {{end}} Total in 29 ms
Sorry, I modified the code snippet. Please try again
Sorry, I modified the code snippet. Please try again
Np, it worked! Thanks
idk about these hooks, do you know where can I put this?
<a class="copyrighted-badge" title="Copyrighted.com Registered & Protected" target="_blank" href="https://www.copyrighted.com/website/m8f7sHfLeK1QozT7"><img alt="Copyrighted.com Registered & Protected" border="0" width="125" height="25" srcset="https://static.copyrighted.com/badges/125x25/03_1_2x.png 2x" src="https://static.copyrighted.com/badges/125x25/03_1.png" /></a><script src="https://static.copyrighted.com/badges/helper.js"></script>
I was adding my site to copyrighted.com also if I want to upload custom HTML files, how could I do that?
I want <a class="copyrighted-badge" title="Copyrighted.com Registered & Protected" target="_blank" href="https://www.copyrighted.com/website/m8f7sHfLeK1QozT7"><img alt="Copyrighted.com Registered & Protected" border="0" width="125" height="25" srcset="https://static.copyrighted.com/badges/125x25/03_1_2x.png 2x" src="https://static.copyrighted.com/badges/125x25/03_1.png" /></a><script src="https://static.copyrighted.com/badges/helper.js"></script>
added to every page automaticaly which will be created in the future or exists already, how can I do it?
All hooks are documented in https://github.com/razonyang/hugo-theme-bootstrap#hooks. The footer-begin, footer-end, main-begin, main-end and body-end may meet your requirement, it is up to you to decide where to place the code.
All hooks are documented in https://github.com/razonyang/hugo-theme-bootstrap#hooks. The footer-begin, footer-end, main-begin, main-end and body-end may meet your requirement, it is up to you to decide where to place the code.
Ohk, I didn't knew that, thanks!
Hello,
I wanted to add a meta tag to the headers, I need to add it to the home page of my website. How can I do that? I tried removing the
.gitignore
file and changing it in thepublic/index.html
then pushing it, it didn't work tho.Please help!