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
57 changes: 22 additions & 35 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,58 +8,44 @@ on:

jobs:
build:
name: Build and sign
name: Build Site
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: "latest"
hugo-version: "0.161.1"
extended: true

- name: Setup Go
# Required by Hugo Modules to fetch the Hugo Blox theme on first build.
uses: actions/setup-go@v5
with:
go-version: '1.22'

- name: Build
run: hugo --minify
go-version: "1.22"

- name: Verify placeholder signed-sections exist
run: |
count=$(grep -rl '<signed-section' public/ | wc -l)
echo "Found $count pages with <signed-section> placeholders"
if [ "$count" -lt 4 ]; then
echo "ERROR: Expected at least 4 pages with signed-section placeholders"
exit 1
fi
- name: Setup Node.js
# Hugo Blox needs preact + tailwindcss + pagefind at build time.
uses: actions/setup-node@v4
with:
node-version: "22"

- name: Install htmltrust-sign
run: go install github.com/HTMLTrust/htmltrust-hugo/cmd/htmltrust-sign@latest
- name: Install npm deps
run: npm install

- name: Sign content
env:
HTMLTRUST_SIGNING_KEY: ${{ secrets.HTMLTRUST_SIGNING_KEY }}
- name: Build site
# node_modules/.bin must be on PATH so the tailwindcss CLI resolves.
run: |
htmltrust-sign --dir public --keyid did:web:jason-grey.com --domain www.htmltrust.org -v
export PATH="$PWD/node_modules/.bin:$PATH"
hugo --minify

- name: Verify signed sections are complete
run: |
if grep -rq 'data-htmltrust-placeholder' public/; then
echo "ERROR: placeholder markers remain - signer did not run on all sections"
exit 1
fi
for f in $(grep -rl '<signed-section' public/); do
if ! grep -q 'content-hash="sha256:' "$f"; then echo "MISSING content-hash in $f"; exit 1; fi
if ! grep -q 'signature="' "$f"; then echo "MISSING signature in $f"; exit 1; fi
if ! grep -q 'keyid="did:web:' "$f"; then echo "MISSING keyid in $f"; exit 1; fi
if ! grep -q 'algorithm="ed25519"' "$f"; then echo "MISSING algorithm in $f"; exit 1; fi
done
echo "OK: all signed-section elements carry the four spec-required attributes"
- name: Build search index
run: npx pagefind --site public

# TODO(htmltrust): re-wire signed-section verification once the signing
# pipeline is integrated with the Hugo Blox build. The previous site
# signed its own pages at the layout level; the new site does not yet.

- uses: actions/upload-artifact@v4
with:
Expand All @@ -71,6 +57,7 @@ jobs:
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
continue-on-error: true
steps:
- uses: actions/download-artifact@v4
with:
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ Thumbs.db
# Hugo build output
public/
resources/_gen/
hugo_stats.json

# Hugo lock file
.hugo_build.lock

# Node deps (Hugo Blox needs preact, tailwindcss, pagefind at build time —
# CI runs `npm install` to fetch them)
node_modules/

# Editor files
*.swp
*.swo
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

126 changes: 0 additions & 126 deletions README.md

This file was deleted.

5 changes: 0 additions & 5 deletions archetypes/default.md

This file was deleted.

62 changes: 62 additions & 0 deletions assets/js/hb-mermaid-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// HTMLTrust mermaid config — overrides Hugo Blox default.
// Blox's default reads Tailwind v4 CSS vars and wraps them in `rgb(...)`,
// producing `rgb(oklch(...))` which mermaid cannot parse. We use static hex
// values that read clearly on the dark site palette.

window.mermaid.initialize({
startOnLoad: true,
theme: "base",
themeVariables: {
// node backgrounds + text
background: "#0d1620",
primaryColor: "#142231",
primaryTextColor: "#e6edf3",
primaryBorderColor: "#4ca1af",

secondaryColor: "#1f3346",
secondaryTextColor: "#e6edf3",
secondaryBorderColor:"#4ca1af",

tertiaryColor: "#0a1018",
tertiaryTextColor: "#aab4be",
tertiaryBorderColor: "#2a3a4a",

// flowchart specifics
mainBkg: "#142231",
nodeBorder: "#4ca1af",
clusterBkg: "#0a1018",
clusterBorder: "#2a3a4a",
titleColor: "#e6edf3",
lineColor: "#7a8aa0",
textColor: "#e6edf3",
edgeLabelBackground: "#0d1620",

// sequence diagram specifics
actorBkg: "#142231",
actorBorder: "#4ca1af",
actorTextColor: "#e6edf3",
actorLineColor: "#7a8aa0",
signalColor: "#aab4be",
signalTextColor: "#e6edf3",
labelBoxBkgColor: "#1f3346",
labelBoxBorderColor: "#4ca1af",
labelTextColor: "#e6edf3",
loopTextColor: "#e6edf3",
noteBkgColor: "#1f3346",
noteTextColor: "#e6edf3",
noteBorderColor: "#4ca1af",

fontFamily: getComputedStyle(document.documentElement).getPropertyValue("font-family"),
fontSize: "16px",
},
flowchart: {
curve: "basis",
htmlLabels: true,
padding: 12,
},
sequence: {
actorMargin: 50,
messageAlign: "center",
mirrorActors: false,
},
});
12 changes: 12 additions & 0 deletions assets/jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"*": [
"../../../../../../.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/!hugo!blox/kit/modules/blox@v0.0.0-20260502203050-b8ad5540288a/assets/*",
"../../../../../../.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/!hugo!blox/kit/modules/blox@v0.0.0-20260502203050-b8ad5540288a/blox/*",
"../../../../../../.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/!hugo!blox/kit/modules/blox@v0.0.0-20260502203050-b8ad5540288a/blox/shared/js/*"
]
}
}
}
Binary file added assets/media/authors/me.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/media/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Loading
Loading