gofiber/template

Recursive .html file parsing ?

Opened this issue · 1 comments

Is it possible to parse html files recursive ? Let's say I have this directory structure:

--templates
-------global
-----------header.html
-----------footer.html
-----------navbar.html
-------pages
-----------index.html
-----------about.html

Right now with html.New("./templates", ".html")

It will error with: render: template index does not exist

It would be nice if the html.New would have a recursive option allowing to parse all templates in all subdirectories

😄

gaby commented

I think this can be done using:

html.New("./templates/*", ".html")