Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 21 additions & 22 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: GitHub Pages
name: GitHub Pages (Go)

on:
push:
Expand All @@ -8,37 +8,36 @@ on:

jobs:
deploy:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v2
- name: Setup Go
uses: actions/setup-go@v5
with:
node-version: '23.x'
go-version: "1.25"

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Install templ
run: go install github.com/a-h/templ/cmd/templ@latest

- name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Generate templ files
run: go tool templ generate

- name: Build static site
run: go run cmd/app/main.go

- run: yarn install --frozen-lockfile
- run: yarn build
- run: echo justinchappell.com > ./dist/CNAME
- run: echo www.justinchappell.com >> ./dist/CNAME
- name: Add CNAME
run: |
echo justinchappell.com > ./dist/CNAME
echo www.justinchappell.com >> ./dist/CNAME

- name: Deploy
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
publish_dir: ./dist
44 changes: 27 additions & 17 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,24 +1,34 @@
# build output
dist/
# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, built with `go test -c`
*.test

# generated types
.astro/
# Code coverage profiles and other test artifacts
*.out
coverage.*
*.coverprofile
profile.cov

# dependencies
node_modules/
# Dependency directories (remove the comment below to include it)
# vendor/

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Go workspace file
go.work
go.work.sum

# environment variables
# env file
.env
.env.production

# macOS-specific files
.DS_Store
# Editor/IDE
# .idea/
# .vscode/

# jetbrains setting folder
.idea/
dist/
20 changes: 0 additions & 20 deletions astro.config.mjs

This file was deleted.

2 changes: 2 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
time go tool templ generate && go run cmd/app/main.go
14 changes: 14 additions & 0 deletions cmd/app/assets/pages/blogs/batching-triangles.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: Batching Triangles OpenGL
author: Justin
date: 2026-02-20
---

# Batching Triangles OpenGL
```
#include <stdio.h>

int main(void) {
return 0;
}
```
8 changes: 8 additions & 0 deletions cmd/app/assets/pages/blogs/ssg-golang.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: Static Site Generation in Golang
author: Justin
slug: this is a test slug
date: 2026-02-20
---

# Static Site Generation in Golang
19 changes: 19 additions & 0 deletions cmd/app/assets/pages/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: Homepage
author: Justin
---

# Justin C. - Software Developer

Hi! my name is Justin and I work in RnD electronics as a software developer.

This is my personal website; here you can explore some of the projects I have
worked on or read random blogs I have written.

If you would like to contact me about hiring me as a developer for your company
please contact me at *contact[dot]justinac[at]gmail[dot]com*

![felix vallotton](https://external-content.duckduckgo.com/iu/?u=http%3A%2F%2Fuploads2.wikiart.org%2Fimages%2Ffelix-vallotton%2Fevening-on-the-loire-1923.jpg&f=1&nofb=1&ipt=dd3fbce30bed26a4ebdf9afcb5f0ffd260afcaed8e014ca7d95de9cd7b2ab14a "Félix Vallotton")
> **[Random Fact About Me]** I love painted landscapes

> (Painting by Félix Vallotton)
87 changes: 87 additions & 0 deletions cmd/app/assets/static/css/global.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
:root {
--bg-color: #1a1a25;
--fg-color: #f3f3f3;
--s-color: #333345;
--border-radius: 5px;
}
body {
font-family: "Noto Sans", Arial, Helvetica, sans-serif;
background-color: var(--bg-color);
color: var(--fg-color);
line-height: 1.6;
padding: 0;
padding-bottom: 4rem;
margin: 0;
margin-top: 6rem;
}

main {
max-width: 800px;
margin: 0 auto;
}

a {
color: cornflowerblue;
text-decoration: none;
text-transform: uppercase;
}
img {
width: 100%;
height: auto;
}

pre {
/* TODO(justin): make this color a var :) */
background-color: #333345;
padding: 1rem;
}

blockquote {
font-style: italic;
margin: 0;
padding: 0;
color: gray;
}

ul {
margin: 0;
padding: 0;
}

hr {
border: 0;
border-top: 1px;
border-style: solid;
border-color: gray;
}

#portfolio-list {
display: grid;
gap: 1ch;
grid-template-columns: 1fr 1fr;
}

.portfolio-item {
position: absolute;
bottom: 0;
left: 0;
z-index: 100;
padding: 1ch;
border-radius: var(--border-radius);
}

.portfolio-item-info {
text-align: center;
display: flex;
width: 100%;
flex-direction: column;
flex-grow: 1;
backdrop-filter: blur(10px);
background-color: var(--s-color);
border-radius: var(--border-radius);
padding-bottom: 1ch;
}

img {
border-radius: 5px;
}
File renamed without changes
Binary file added cmd/app/assets/static/img/hackathon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions cmd/app/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package main

import (
"embed"

"justinac0.github.io/internal/ssg"
)

//go:embed assets
var public embed.FS

func main() {
BASE_DIR := "assets/pages"
ssg.GenFromEmbedFS(public, BASE_DIR)
}
47 changes: 47 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
module justinac0.github.io

go 1.25.0

require (
github.com/a-h/templ v0.3.977
github.com/gomarkdown/markdown v0.0.0-20260217112301-37c66b85d6ab
github.com/labstack/echo/v5 v5.0.4
go.yaml.in/yaml/v3 v3.0.4
)

require (
dario.cat/mergo v1.0.2 // indirect
github.com/a-h/parse v0.0.0-20250122154542-74294addb73e // indirect
github.com/air-verse/air v1.64.5 // indirect
github.com/andybalholm/brotli v1.2.0 // indirect
github.com/bep/godartsass/v2 v2.5.0 // indirect
github.com/bep/golibsass v1.2.0 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cli/browser v1.3.0 // indirect
github.com/fatih/color v1.18.0 // indirect
github.com/fsnotify/fsnotify v1.9.0 // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/gohugoio/hugo v0.149.1 // indirect
github.com/joho/godotenv v1.5.1 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/natefinch/atomic v1.0.1 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
github.com/spf13/afero v1.14.0 // indirect
github.com/spf13/cast v1.9.2 // indirect
github.com/tdewolff/parse/v2 v2.8.3 // indirect
golang.org/x/mod v0.31.0 // indirect
golang.org/x/net v0.49.0 // indirect
golang.org/x/sync v0.19.0 // indirect
golang.org/x/sys v0.40.0 // indirect
golang.org/x/text v0.33.0 // indirect
golang.org/x/time v0.14.0 // indirect
golang.org/x/tools v0.40.0 // indirect
google.golang.org/protobuf v1.36.8 // indirect
)

tool (
github.com/a-h/templ/cmd/templ
github.com/air-verse/air
)
Loading