Closed alexkazik closed 2 years ago
include
reads a file and places it in the code so it will be compiled as rust code.
html_file
reads a maud template and returns a Html with the template.
And you could use include to do the same but would have to include html! in it, this looks as if it's made for it.
I've done this because it's similar to Haskell's Shakespeare, and they also have macros for in-line and in file.
This PR has a little bug anyway.
But it would be a good idea to add an include! example to the website.
This allows for using external html, when it's a big chunk it's better to read when not part of the rust file.
It will be searched relative to the project root.
I've tested this only on top of https://github.com/lambda-fairy/maud/pull/322 and rocket 0.5 support, not on actual main but it should be of no difference.