• Stars
    star
    6,289
  • Rank 6,041 (Top 0.2 %)
  • Language
    Go
  • License
    MIT License
  • Created about 3 years ago
  • Updated 25 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A language for writing HTML user interfaces in Go.

templ

A HTML templating language for Go that has great developer tooling.

templ

Documentation

See user documentation at https://templ.guide

Tasks

nix-develop

Run a Nix shell that contains everything required to build templ.

nix develop --impure

build

Build a local version.

cd cmd/templ
go build

install-snapshot

Build and install to ~/bin

rm cmd/templ/lspcmd/*.txt || true
cd cmd/templ && go build -o ~/bin/templ

build-snapshot

Use goreleaser to build the command line binary using goreleaser.

goreleaser build --snapshot --rm-dist

generate

Run templ generate using local version.

go run ./cmd/templ generate

test

Run Go tests.

go run ./cmd/templ generate && go test ./...

test-cover

Run Go tests.

# Create test profile directories.
mkdir -p coverage/generate
mkdir -p coverage/unit
# Build the test binary.
go build -cover -o ./coverage/templ-cover ./cmd/templ
# Run the covered generate command.
GOCOVERDIR=coverage/generate ./coverage/templ-cover generate
# Run the unit tests.
go test -cover ./... -args -test.gocoverdir="$PWD/coverage/unit"
# Display the combined percentage.
go tool covdata percent -i=./coverage/generate,./coverage/unit
# Generate a text coverage profile for tooling to use.
go tool covdata textfmt -i=./coverage/generate,./coverage/unit -o coverage.out

lint

docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.52.2 golangci-lint run -v

release

Create production build with goreleaser.

if [ "${GITHUB_TOKEN}" == "" ]; then echo "No github token, run:"; echo "export GITHUB_TOKEN=`pass github.com/goreleaser_access_token`"; exit 1; fi
./push-tag.sh
goreleaser --clean

docs-run

Run the development server.

Directory: docs

npm run start

docs-build

Build production docs site.

Directory: docs

npm run build

docker-build

Build a Docker container with a full development environment and Neovim setup for testing the LSP.

docker build -t templ:latest .

docker-run

Run a Docker development container in the current directory.

docker run -p 7474:7474 -v `pwd`:/templ -it --rm templ:latest

More Repositories

1

generate

Generates Go (golang) Structs from JSON schema.
Go
404
star
2

dynamocapacity

Compare cost of DynamoDB On Demand versus your current Provisioned Capacity setup.
Go
63
star
3

FakeDbSet

The nuget package which provides a quick way to get an InMemoryDbSet into your project.
C#
49
star
4

gpu

Run GPU code on your Apple system with Go.
Objective-C
49
star
5

parse

Go
41
star
6

ddbimport

Fast DynamoDB imports
Go
38
star
7

gemini

Go
30
star
8

min

A Gemini browser (https://gemini.circumlunar.space)
Go
22
star
9

pico_usb_kbd_mouse

Minimal example of a Raspberry Pi Pico as a USB host accepting keboard and mouse input.
C
21
star
10

rest

rest
Go
21
star
11

lexical

A set of tools for building parsers using the Go programming language.
Go
21
star
12

hsts

Go (Golang) middleware to implement HSTS
Go
20
star
13

dotfiles

Nix
16
star
14

hde

Event sourced database design in DynamoDB.
TypeScript
16
star
15

round

math.Round for Go
Go
14
star
16

stream

Event sourced Go with DynamoDB.
Go
13
star
17

ver

A tool which analyses Go code stored in Git repositories and determines an appropriate version number.
Go
12
star
18

jwtproxy

A reverse proxy which validates access using JWT.
Go
11
star
19

awsapigatewayv2handler

HTTP API Gateway to Lambda adapter for Go.
Go
11
star
20

version

Demonstrates a versioning strategy for Go services and applications.
Go
11
star
21

go-sql-driver-rds-credentials

Rotate MySQL credentials while applications are running, compatible with AWS Secrets Manager.
Go
9
star
22

serverless-testing

TypeScript
9
star
23

typescript-lambda-xray

Example of TypeScript Lambda using AWS X-Ray
TypeScript
8
star
24

subscription

TypeScript
8
star
25

examplelsp

Go
8
star
26

go-hotwire-todo

Go
7
star
27

organisation

DynamoDB data storage for User and Roles within an Organisation, in Go.
Go
7
star
28

cdk-ecr-asset-cleaner

Cleans out unused CDK Docker / ECR assets
Go
6
star
29

templ-vscode

VSCode extension for templ.
TypeScript
6
star
30

windows-auth-jwt

Uses Windows Authentication to create a signed JWT - used to create a single-sign-on system for Web applications.
C#
5
star
31

ansible-mongodb-cluster-aws

HCL
5
star
32

understanding-lsp

understanding-lsp
Vue
5
star
33

gofit

A web-based integration into Google Fit.
Go
5
star
34

vpc-setup

TypeScript
5
star
35

slowloris

It serves, just slowly.
Go
5
star
36

pill

A skills matrix Web application in Golang with a MongoDB backend.
JavaScript
4
star
37

oxyplot-extensions

A set of extensions to OxyPlot which reduce the amount of code required to graph data.
C#
4
star
38

once

Idempotent API library using TypeScript and DynamoDB
TypeScript
4
star
39

ci-policy-test

Go
4
star
40

dynamotableviz

dynamotableviz
Go
4
star
41

tierednetwork

A network written in Terraform.
HCL
4
star
42

keypad

A Go library to use 4x4 keypads with the Raspberry Pi.
Go
3
star
43

aws-go-cdk-action

Dockerfile
3
star
44

nix-golang

Nix flakes for the Go programming language.
Nix
3
star
45

githubbackup

Backup Github codebase to S3.
Dockerfile
3
star
46

qt-lsp

Go
3
star
47

ml

A collection of functions and algorithms for machine learning.
Go
3
star
48

ecs-task-run

Go
2
star
49

pathvars

Extract path variables from URLs using URL templates.
Go
2
star
50

pregel

Graph-oriented store for DynamoDB.
Go
2
star
51

terraform-example

Example Terraform configuration for an ECS and RDS cluster.
HCL
2
star
52

natsjson

JSON message publishing and subscription for NATS.
Go
2
star
53

htmlformat

htmlformat
Go
2
star
54

picotemp

PicoW temperature sensor.
Python
2
star
55

aws-capsule

TypeScript
2
star
56

date

JSON date formats for Go.
Go
2
star
57

ts-jest-mock

TypeScript
2
star
58

openanalysis

Github analysis of what open source projects users have been involved with.
Go
2
star
59

MappedObjectLibrary

A bootstrapper / initializer for AutoMapper objects.
C#
2
star
60

virshjson

Converts virsh output to JSON.
Go
2
star
61

python-lambda

Python CDK Lambda test.
TypeScript
1
star
62

lambda-middleware

TypeScript
1
star
63

raster

A very simple library for drawing 2D shapes onto images.
Go
1
star
64

rest-api

Example Go REST API.
Go
1
star
65

gmx-v

A .Net (C#) implementation of the LISA GMX/V standard.
C#
1
star
66

cdk-go-app-runner

Go
1
star
67

configurationstore

Provides a central repository for configuration.
C#
1
star
68

core

Example of dotNet core with Docker build process.
C#
1
star
69

search

Find files and text within them.
Go
1
star
70

urlscan

Go
1
star
71

segment

A Go library for using 4 digit, 7 segment displays (e.g. 3461BS) with the Raspberry Pi.
Go
1
star
72

gauthmiddleware

Go Middleware to limit access to Web content (not APIs) using Google Sign-in For Websites (Google Authentication).
Go
1
star
73

playdate-c-sdk-test

Example of unit testing in the Playdate C SDK.
C
1
star
74

virshautoscaler

Auto restart stopped virsh virtual machines.
Go
1
star
75

hashdir

Go
1
star
76

htmx-microfrontend

Go
1
star
77

aws-go-cdk-action-test

Go
1
star
78

the-flying-gentleman

A deployment framework for writing deployments in C#.
C#
1
star
79

qq

TypeScript
1
star
80

arm-test

Example of Docker deploy on M1 to x86 on AWS.
TypeScript
1
star
81

podman-in-podman

Example of running podman inside podman.
Dockerfile
1
star
82

devcontainer

Example devcontainer for packaging using Nix inside VS Code and Docker.
Nix
1
star
83

alarm

A house alarm for the Raspberry Pi.
Go
1
star
84

h

A helpful shortcut reminder for vim / tmux.
Go
1
star
85

screentest

Example of using the "github.com/fogleman/gg" 2D library with the "golang.org/x/exp/shiny/screen".
Go
1
star
86

nix-airgapped-copy

Nix
1
star
87

data-academy-serverless

Go
1
star
88

AspNetCore.Antiforgery.Aes

An implementation of the IAntiforgery CSRF protection mechanism for dotnet core which avoids the data protection API
C#
1
star
89

nvdnotifier

Notify when something relevant is added to the NIST database.
Go
1
star
90

cwexport

Export CloudWatch Metrics to a sink.
Go
1
star
91

linear

Coursework for Udacity Linear Algebra Refresher course.
Go
1
star
92

esbuild-mock-test

TypeScript
1
star
93

s3policy

Applies S3 policies and settings which pass AWS Config's default settings.
Go
1
star
94

alarmclock

Alarm clock holiday project, written in React.
JavaScript
1
star
95

dynamodownload

Download data from DynamoDB as JSON without thrashing your read capacity too much.
Go
1
star
96

remotetemp

C++
1
star