-
Create a main package to serve the documentation
mkdir -p ./cmd/template-docs -
Create a
main.gofile in the./cmd/template-docsdirectorypackage main import ( "cmp" _ "embed" "html/template" "log" "net/http" "os" "github.com/crhntr/templatedocumentation" "example.com/org/module/internal/hypertext" // replace with your module ) func main() { h := templatedocumentation.Handler(func() (*template.Template, template.FuncMap, error) { fn := hypertext.Functions() ts, err := hypertext.Template() return ts, fn, err }) log.Fatal(http.ListenAndServe(":"+cmp.Or(os.Getenv("DOCS_PORT"), "8200"), h)) }
-
Run the server
go run ./cmd/template-docs -
Navigate to
http://localhost:8200to view the documentation.
This repository was archived by the owner on May 5, 2026. It is now read-only.
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|