GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Star941
  • Docs
  • Examples
  • Convert HTML

This view

  • Original page
  • New address

GeezerVison is showing htmgo.dev — Docs - Introduction

Documentation

Getting Started

IntroductionQuick StartRelated ProjectsMinimal Htmgo

Core Concepts

PagesPartialsComponentsTags and AttributesRaw HTML

Control

ConditionalsRendering Lists

Interactivity

SwappingEventsEvaluating JavascriptEval Commands

Performance

Caching GloballyCaching Per KeyCustom Cache Stores

Pushing Data

Server Sent Events

HTMX Extensions

OverviewTrigger ChildrenMutation Error

Miscellaneous

Tailwind IntellisenseFormatter

Configuration

Htmgo Config

Introduction

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

We give you the utilities to build html using pure go code in a reusable way (go functions are components) while also providing htmx functions to add interactivity to your app.

func DocsPage(ctx *h.RequestContext) *h.Page { pages := dirwalk.WalkPages("md/docs") return h.NewPage( h.Div( h.Class("flex flex-col md:flex-row gap-4"), DocSidebar(pages), h.Div( h.Class("flex flex-col justify-center items-center mt-6"), h.List(pages, func(page *dirwalk.Page, index int) *h.Element { return h.Div( h.Class("border-b border-b-slate-300"), MarkdownContent(ctx, page), ) }), ), ), }
Copy
 1func DocsPage(ctx *h.RequestContext) *h.Page {
 2	pages := dirwalk.WalkPages("md/docs")
 3	return h.NewPage(
 4	h.Div(
 5		h.Class("flex flex-col md:flex-row gap-4"),
 6		DocSidebar(pages),
 7		h.Div(
 8			h.Class("flex flex-col justify-center items-center mt-6"),
 9			h.List(pages, func(page *dirwalk.Page, index int) *h.Element {
10				return h.Div(
11					h.Class("border-b border-b-slate-300"),
12					MarkdownContent(ctx, page),
13				)
14			}),
15		 ),
16	  ),
17}

The site you are reading now was written with htmgo!

Next

Getting Started

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.