Anchor Tags
For site structure I have an index, with multiple pages each as a layout built with partials and custom html. I have a base of template that adds a footer to every page. This footer includes contact form with id="#contact"
. In the Main section of everypage I have an anchor that href="#contact"
. I dont know about the build yet but on my local server every time I click the main button it takes to the index page contact, and not the contact on each page.
I have been reading https://gohugo.io/content-management/cross-references/ but I am getting errors when I do href=" {{< relref "#contact" >}}"
or href=" {{< ref "#contact" >}}"
Javascript
I have never actually made a multipage site yet, and I am not sure the proper approach here. I have one app.js file with all the code for the whole site, but not all of it is needed on every page. SO I am getting some reference errors. Should I make make multiple files, and include them separately in each page footer, or some how activate the script from within one file if it recognizes the page? I am using victor-hugo boilerplate with webpack.