Add support for additional HTML attributes in HTML5 template (#238) This PR updates the HTML5 function to accept and render additional HTML attributes. An additional test case to validate this enhancement has been added as well.
1 file changed, 2 insertions(+), 1 deletion(-)
changed files
M components/components.go → components/components.go
@@ -18,12 +18,13 @@ Description string Language string Head []g.Node Body []g.Node + HTMLAttrs []g.Node } // HTML5 document template. func HTML5(p HTML5Props) g.Node { return Doctype( - HTML(g.If(p.Language != "", Lang(p.Language)), + HTML(g.If(p.Language != "", Lang(p.Language)), g.Group(p.HTMLAttrs), Head( Meta(Charset("utf-8")), Meta(Name("viewport"), Content("width=device-width, initial-scale=1")),