I am experimenting with the package http/template
.
I have also already managed that e.g. the header, footer, navbar and so on were included in the base templ
You have to pass the context to the instantiated templates. Use
{{ template "content" .}}
to pass the data in .
to the content
template.
You're not passing any data to the child templates. Per the docs:
{{template "name"}}
The template with the specified name is executed with nil data.
{{template "name" pipeline}}
The template with the specified name is executed with dot set
to the value of the pipeline.