gofiber / fiber

⚡️ Express inspired web framework written in Go
https://gofiber.io
MIT License
33.06k stars 1.63k forks source link

đź“š Doc: Add detailed documentation for the templates guide #3108

Closed grivera64 closed 2 weeks ago

grivera64 commented 3 weeks ago

Maintenance Task Description

This issue proposes to provide more snippets of ways to use templates in Go Fiber’s templates guide.

This would include adding information on how to:

Impact on the Project

Adding more detailed documentation of common use cases will help make Go Fiber easier to adopt for newcomers interested in using templates. While guides on templates can be found on other websites, providing this information within GoFiber’s own docs will make it easier to get started.

Adding this might require re-ordering the headings within the gofiber.io templates guide to avoid cluttering the page, but we can follow the format of similar pages (view additional context).

Additional Context (optional)

The goal is to have a more detailed guide for templates like in the routing guide:

Thank you for your time and consideration.

Checklist:

efectn commented 2 weeks ago

Feel free to create a PR. I agree with you, we need more detailed guides for templates. We can add common usecases into templates section and specific usecases to template itself

grivera64 commented 2 weeks ago

Sounds good! I made a draft PR to work on this issue.

I am currently working on adding a few advanced use cases, (such as using engine.AddFunc()). We can also consider adding the use cases featured in the gofiber/template README.md, though we should only include generic features provided by all template engines.

grivera64 commented 2 weeks ago

I also added a link to the gofiber/template GitHub repository to help guide newcomers to find engine-related code.

I believe the PR is ready to be pulled, please let me know if I should make any changes or if you have any recommended additions.

grivera64 commented 2 weeks ago

Thanks @ReneWerner87 for merging my pull request to v2 and adapting it for v3! Marking this issue as completed.