Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 [Feature]: fiber/middleware/filesystem - support for templating #2104

Open
3 tasks done
pjebs opened this issue Sep 19, 2022 · 6 comments
Open
3 tasks done

🚀 [Feature]: fiber/middleware/filesystem - support for templating #2104

pjebs opened this issue Sep 19, 2022 · 6 comments

Comments

@pjebs
Copy link
Contributor

pjebs commented Sep 19, 2022

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:

  • I agree to follow Fiber's Code of Conduct.
  • I have checked for existing issues that describe my suggestion prior to opening this one.
  • I understand that improperly formatted feature requests may be closed without explanation.
@pjebs pjebs changed the title 🚀 [Feature]: fiber/middleware/filesystem/ support for templating 🚀 [Feature]: fiber/middleware/filesystem - support for templating Sep 19, 2022
@ReneWerner87
Copy link
Member

@pjebs
Copy link
Contributor Author

pjebs commented Sep 19, 2022

It does not provide the full options and configurability of the filesystem middleware.

Eg directory listing

@efectn
Copy link
Member

efectn commented Sep 24, 2022

It does not provide the full options and configurability of the filesystem middleware.

Eg directory listing

Can you provide an example/code snippet

@pjebs
Copy link
Contributor Author

pjebs commented Sep 24, 2022

@efectn
Copy link
Member

efectn commented Sep 24, 2022

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

@pjebs
Copy link
Contributor Author

pjebs commented Sep 24, 2022

The files I want to serve are mostly html files with some placeholders inside for a templating engine to substitute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants