I'm looking for a way to embed an html template into another, similar to the angular content projection mechanism.
Example:
site-frame.html
{{define "site"}}
<head>...</head>
<body>
Insert other template here ...
</body>
{{end}}
foo.html
{{define "foo"}}
<p> Hello </p>
{{end}}
Now I want to dynamically embed foo.html
into site-frame.html
like this
<head>...</head>
<body>
<p> Hello </p>
</body>
Is there a way to achieve this with the go html template engine? If not, how would you manage a global frame for your site?