Skip to content

maddalax/htmgo

This branch is 30 commits behind master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ef83e34 · Nov 16, 2024
Nov 11, 2024
Nov 14, 2024
Nov 9, 2024
Nov 13, 2024
Nov 9, 2024
Nov 16, 2024
Nov 13, 2024
Nov 9, 2024
Oct 25, 2024
Sep 23, 2024
Oct 12, 2024
Sep 25, 2024
Oct 31, 2024
Oct 13, 2024

Repository files navigation

htmgo

build simple and scalable systems with go + htmx


Go Report Card Build Go Reference codecov Join Discord

looking for a python version? check out: https://fastht.ml

introduction:

htmgo is a lightweight pure go way to build interactive websites / web applications using go & htmx.

By combining the speed & simplicity of go + hypermedia attributes (htmx) to add interactivity to websites, all conveniently wrapped in pure go, you can build simple, fast, interactive websites without touching javascript. All compiled to a single deployable binary.

func IndexPage(ctx *h.RequestContext) *h.Page {
  now := time.Now()
  return h.NewPage(
    h.Div(
      h.Class("flex gap-2"),
      h.TextF("the current time is %s", now.String())
    )
  )
}

core features:

  1. deployable single binary
  2. live reload (rebuilds css, go, ent schema, and routes upon change)
  3. automatic page and partial registration based on file path
  4. built in tailwindcss support, no need to configure anything by default
  5. custom htmx extensions to reduce boilerplate with common tasks

get started:

View documentation on htmgo.dev.

Star History

Star History Chart