https://github.com/typelate/htmx-template
An example (and Go Project Template) using MUXT and HTMX.
https://github.com/typelate/htmx-template
go go-template htmx htmx-app hypermedia muxt pico-css
Last synced: 7 months ago
JSON representation
An example (and Go Project Template) using MUXT and HTMX.
- Host: GitHub
- URL: https://github.com/typelate/htmx-template
- Owner: typelate
- License: unlicense
- Created: 2024-10-29T23:03:38.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-07-22T03:18:58.000Z (11 months ago)
- Last Synced: 2025-10-12T11:47:51.528Z (8 months ago)
- Topics: go, go-template, htmx, htmx-app, hypermedia, muxt, pico-css
- Language: Go
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# A Simple MUXT Project Template using HTMX
This is an example [muxt](http://github.com/crhntr/muxt) hypertext server.
See this article for how to use this template: https://go.dev/blog/gonew.
You may also want to see:
- [HTMX](https://htmx.org): configured for site interactivity
- [Pico CSS](https://picocss.com/docs): configured to make the site look a bit better by default
- [counterfeiter](https://github.com/maxbrunsfeld/counterfeiter): used to generate fake Server implementations for testing templates
- [unpkg.com](https://unpkg.com): use the meta query param to get new version integrity values
## Developing
Add new HTML in `./internal/hypertext/templates`.
Use inline template declarations in the template files using muxt template name semantics
then run Go generate to generate a function that maps hypertext concepts to helpful handler methods.
## Testing
After developing routes, run `go generate ./...`.
Write handler tests in `./internal/hypertext/server_test.go`.
Write template tests in `./internal/hypertext/template_routes_test.go`.
Run tests with: `go test ./...`
## Licensing
Please consider removing or replacing the LICENSE file.