Skip to content

Repository files navigation

Stack

The backend is written in Go using templ and using stdlib HTTP.

Styling is done via tailwindcss.

Reactivity is done thanks to datastar.

Building + Running

All building is managed via nix.

Use nix build .#<name> to run a build command. The names are:

  • #default: this produces the webserver binary
  • #container: docker image containing the webserver binary

Developing

Run ./dev.sh for the dev loop: it starts the templ proxy, the Go server (air rebuilds it on .go changes), the tailwindcss watcher, and an asset-sync watcher, cleaning up stragglers on exit.

The webserver port is set via environment variable WEBSERVER_PORT.

Blog Configuration

The website fetches blog posts from configurable sources using the BLOG_SOURCE environment variable:

Local Directory:

BLOG_SOURCE="~/projects/blogs/"
BLOG_SOURCE="/absolute/path/to/blogs/"
BLOG_SOURCE="./relative/path/"

Git Repositories (Nix-style format):

BLOG_SOURCE="github:owner/repo"
BLOG_SOURCE="gitlab:owner/repo"

Default: If no BLOG_SOURCE is set, defaults to my blogs (github:ethanthoma/blogs).

Blog Post Format

Blog posts are in markdown. They support YAML frontmatter:

---
title: "Post Title"
date: "2024-01-15T10:30:00Z"
slug: "post-slug"
---

# Post Title
Content here...

About

Personal website using the GoTH stack

Topics

Resources

Stars

Watchers

Forks

Packages

Used by

Contributors

Languages