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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃殌 [Feature]: htmx support #276

Closed
3 tasks done
gedw99 opened this issue Jul 10, 2023 · 10 comments
Closed
3 tasks done

馃殌 [Feature]: htmx support #276

gedw99 opened this issue Jul 10, 2023 · 10 comments

Comments

@gedw99
Copy link

gedw99 commented Jul 10, 2023

Feature Description

Htmx uses go templates or any templating system to send html to the browser client in a progressive enhancement way

Additional Context (optional)

https://news.ycombinator.com/item?id=32789004 Has links bout htmx and why golang coders are using it.

Code Snippet (optional)

package main

import "github.com/gofiber/template/%package%"

func main() {
  // Steps to reproduce
}

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.
@iredmail
Copy link
Contributor

I use htmx (and hyperscript, alpinejs) too.

@ReneWerner87
Copy link
Member

htmx is something that is executed in the frontend

so how can we provide this as a template engine ?
can you please describe in more detail what you expect ?

@gedw99
Copy link
Author

gedw99 commented Jul 10, 2023

Well glad your asking

here is a project that does it

https://github.com/livefir/fir/tree/main

@ReneWerner87
Copy link
Member

but there the html engine is used for rendering, which we already provide as template engine

probably you want to have a workflow which combines the backend rendering process and active events from the frontend in one solution

then you should create a request in the contrib repository for such a solution via middleware

the template rendering engines are pure backend template systems which have only this one task and are independent from other feature sets

@gedw99
Copy link
Author

gedw99 commented Jul 10, 2023

yes i was thinking that we could add htmx as either an example or more integrated.

I am totally biased. I love htmx because it allows backend devs to do frontend without going nuts.

@gedw99
Copy link
Author

gedw99 commented Jul 10, 2023

probably you want to have a workflow which combines the backend rendering process and active events from the frontend in one solution

YES exactly !!

@gedw99
Copy link
Author

gedw99 commented Jul 10, 2023

If you want to have a chat about it happy to. I am in Berlin. Saw your in germany

@ReneWerner87
Copy link
Member

ReneWerner87 commented Jul 10, 2023

just join the discord channel and we can chat

best you create a feature request for the contrib repository and there you(or someone) solve the combination of html template and sse/websocket in a middleware that sets up the application
https://github.com/gofiber/contrib/

@gedw99
Copy link
Author

gedw99 commented Jul 10, 2023

thanks @ReneWerner87

wil make a feature request and join the chat

@gedw99
Copy link
Author

gedw99 commented Jul 28, 2023

Here is the new issue: gofiber/contrib#679

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