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

🚀 EJS template renderer #1773

Closed
SowinskiBraeden opened this issue Feb 13, 2022 · 4 comments
Closed

🚀 EJS template renderer #1773

SowinskiBraeden opened this issue Feb 13, 2022 · 4 comments

Comments

@SowinskiBraeden
Copy link

SowinskiBraeden commented Feb 13, 2022

Enabling fiber to use a renderer such as EJS, for example:

package main

import (
  "github.com/gofiber/fiber/v2"
  "github.com/gofiber/fiber/v2/template/ejs"
)

func main() {
  app := fiber.New(fiber.Config{
        Views: ejs.New("./views", ".ejs"),
  })

  app.Post("/", func (c *fiber.Ctx) error {
    return c.Render("index", fiber.Map{
          "myVariable": someRandomVariable,
      })
  })
}

enabling the ability to serve a .ejs file and pass variables

@welcome
Copy link

welcome bot commented Feb 13, 2022

Thanks for opening your first issue here! 🎉 Be sure to follow the issue template! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord

@SowinskiBraeden SowinskiBraeden changed the title 🚀 Custom Renderer support 🚀 EJS template renderer Feb 13, 2022
@SowinskiBraeden
Copy link
Author

I would like to take this issue, I can gladly develop this feature.

I know there is the html renderer, but I really like using .ejs
I use it often and really like the simplicity of it compared to html conditional statements. So I just thought it would be great to see EJS compatibility within one of my projects.

@ReneWerner87
Copy link
Member

Ok, you are welcome to create a pull request

Please create the feature report in the template repository next time

@efectn
Copy link
Member

efectn commented Apr 8, 2022

duplicate of gofiber/template#164

@efectn efectn closed this as completed Apr 8, 2022
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