fiber
fiber copied to clipboard
🚀 [Feature]: fiber/middleware/filesystem - support for templating
Feature Description
I am embedding a html file using the filesystem middleware.
There is currently no support to add some templating. It would be good to inject some simple variables into the html file.
Additional Context (optional)
No response
Code Snippet (optional)
No response
Checklist:
- [X] I agree to follow Fiber's Code of Conduct.
- [X] I have checked for existing issues that describe my suggestion prior to opening this one.
- [X] I understand that improperly formatted feature requests may be closed without explanation.
what about this https://github.com/gofiber/template/tree/master/html#example-with-embedfs ?
It does not provide the full options and configurability of the filesystem middleware.
Eg directory listing
It does not provide the full options and configurability of the filesystem middleware.
Eg directory listing
Can you provide an example/code snippet
https://github.com/gofiber/fiber/blob/master/middleware/filesystem/filesystem.go#L38
https://github.com/gofiber/fiber/blob/master/middleware/filesystem/filesystem.go#L38
Why to want filesystem middleware for templating? It's just for serving files
The files I want to serve are mostly html files with some placeholders inside for a templating engine to substitute.