https://github.com/m8rmclaren/website
My personal website written with Templ + HTMx, served by Go (full SSR)
https://github.com/m8rmclaren/website
go-echo htmx ssr templ
Last synced: 4 months ago
JSON representation
My personal website written with Templ + HTMx, served by Go (full SSR)
- Host: GitHub
- URL: https://github.com/m8rmclaren/website
- Owner: m8rmclaren
- Created: 2024-03-27T04:33:40.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-08-23T17:15:59.000Z (5 months ago)
- Last Synced: 2025-08-23T23:46:10.983Z (5 months ago)
- Topics: go-echo, htmx, ssr, templ
- Language: templ
- Homepage: https://haydenroszell.com
- Size: 8.31 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Welcome to my Personal Website
## Building Locally
[`libvips`](https://github.com/libvips/libvips) must be installed on the system running the website binary. This
library is used by the image optimizer to serve correctly sized images to the browser upon request. `libvips` is written in
C and is dynamically linked to the website binary at compile time. The `libvips` API is consumed in Go using bindings
generated by [vipsgen](https://github.com/cshum/vipsgen). The bindings are not committed to Git since the version of `libvips`
could vary by system.
```shell
# Install libvips & generate bindings
brew install vips pkg-config
go install github.com/cshum/vipsgen/cmd/vipsgen@latest
vipsgen -out ./vips
```
The website uses [`templ`](https://templ.guide/) to render HTML fragments & compose them into cohesive web pages.
Templ is a code generator with a pipeline that renders `templ` files to `go` files. The generated Go files are not
committed to Git & are generated before compiling.
[`air`](https://github.com/air-verse/air) is a live-reload tool that watches for changes in files & automatically
re-compiles the project for dev.
The website uses [Tailwind CSS](https://tailwindcss.com/docs/installation/tailwind-cli) as a utility-first CSS framework
and must be installed before `air` can run.
```shell
go install github.com/a-h/templ/cmd/templ@latest
go install github.com/air-verse/air@latest
npm ci
```
Once dependencies are installed, run `init.sh`:
```shell
./init.sh
# Prompts you to run 'source .env'
source .env
```
Now you can run `dev` from your command line as a convenient TUI tool to interact with the website for dev. Use
arrow keys and `return` to interact with the menu.
```shell
❯ dev
╭────────────────────────────────────────────────────────────────────────────────────╮
│ Select verb: ╭───────────────────────────────────────╮ │
│ 2/2 ────────────────────────────────── │ start_website_dev │ │
│ Verbs │ │ │
│ ▌ start │ │ │
│ build │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ ╰───────────────────────────────────────╯ │
╰────────────────────────────────────────────────────────────────────────────────────╯
```