saturn
- 187 commits
- 2 branches
- 0 tags
- updated
- CI 2/2
feat: remove sync/likes/comments
SignedGitea couldn't verify the signature.
Showing 43 changed files with 61 additions and 2922 deletions.
.gitignore
+0 −4
@@ -4,7 +4,3 @@4455# deploy staging66dist/78# wrangler (local d1 + secrets)9.wrangler/10.dev.vars
.tangled/workflows/deploy.yml
+1 −1
@@ -25,7 +25,7 @@ steps:2525 set -euo pipefail2626 mkdir dist2727 git ls-files -z \28 | grep -zv -e '^internal/' -e '^scripts/' -e '^workers/' -e '^\.tangled/' -e '^\.gitignore$' -e '^mise\.toml$' \28 | grep -zv -e '^internal/' -e '^scripts/' -e '^\.tangled/' -e '^\.gitignore$' -e '^mise\.toml$' \2929 | xargs -0 cp --parents -t dist30303131 - name: "Deploy to Cloudflare Pages"
.tangled/workflows/sync.ymldeleted
+0 −60
@@ -1,60 +0,0 @@1# copies my bluesky posts and recent project commits into the html,2# publishes my writing to standard.site, then commits and pushes the result3# back here, which runs deploy and mirror. runs once an hour. to run it now,4# open the latest sync pipeline and hit retry.5# needs the ATPROTO_APP_PASSWORD and TANGLED_PUSH_KEY secrets67when:8 - event: ["schedule"]9 schedule:10 - cron: "H * * * *"11 - event: ["manual"]1213engine: "nixery"1415dependencies:16 nixpkgs:17 - nodejs18 - openssh1920steps:21 # a scheduled run starts from whatever main was when spindle last looked,22 # so catch up before changing anything23 - name: "Check out the newest main"24 command: |25 set -euo pipefail26 git fetch origin main27 git checkout -B main FETCH_HEAD2829 - name: "Sync posts"30 command: node scripts/sync-posts.mjs3132 - name: "Sync commits"33 command: node scripts/sync-commits.mjs3435 - name: "Publish to standard.site"36 command: node scripts/sync-standard.mjs3738 - name: "Commit and push"39 command: |40 set -euo pipefail41 if git diff --quiet; then42 echo "nothing changed"43 exit 044 fi4546 # ssh refuses to run without a passwd entry, and nixery images have none47 mkdir -p /etc48 [ -e /etc/passwd ] || echo "root:x:0:0:root:${HOME}:/bin/bash" > /etc/passwd4950 mkdir -p "${HOME}/.ssh"51 printf '%s\n' "${TANGLED_PUSH_KEY}" > "${HOME}/.ssh/tangled"52 chmod 600 "${HOME}/.ssh/tangled"53 ssh-keyscan tangled.org > "${HOME}/.ssh/known_hosts"5455 git config user.name "daniel daum"56 git config user.email "daniel@danieldaum.net"57 git commit -am "chore: sync"5859 export GIT_SSH_COMMAND="ssh -i ${HOME}/.ssh/tangled -o IdentitiesOnly=yes -o UserKnownHostsFile=${HOME}/.ssh/known_hosts"60 git push git@tangled.org:danieldaum.net/saturn HEAD:refs/heads/main
.well-known/site.standard.publicationdeleted
+0 −1
@@ -1 +0,0 @@1at://did:plc:e3z5gj5iyuwgqao562bo4bdf/site.standard.publication/3mbd3542k2222
README.md
+2 −8
@@ -11,12 +11,6 @@ mise run serve11111212then open localhost:8080.131314## post on bluesky1516post it. the sync pipeline runs once an hour and puts it on the home page, /blog/ and /posts/. to run it now: tangled → saturn → pipelines → the newest sync run → retry. `git pull` before working on the site again.1718the same sync refreshes the recent commits on /projects/ and /projects/holonet/ (locally: `mise run sync-commits`).192014## new blog post211522161. `git pull`@@ -25,7 +19,7 @@ the same sync refreshes the recent commits on /projects/ and /projects/holonet/25194. add it to recent writing on the home page, with the word count26205. add it to `feed.xml`27216. if it's a now page, update `/now/` too287. push. the next sync puts it on standard.site227. push29233024reviews go in the same writing list, tagged #game, #movie, #show, #book or #album. they don't go in the feed.3125@@ -39,5 +33,5 @@ reviews go in the same writing list, tagged #game, #movie, #show, #book or #albu3933## good to know40344135- `internal/` never gets deployed. `internal/styles.html` shows every style on the site.42- ci lives in `.tangled/workflows/`: deploy and mirror run on every push to main, sync runs hourly. secrets are under settings → pipelines on tangled.36- ci lives in `.tangled/workflows/`: deploy and mirror run on every push to main. secrets are under settings → pipelines on tangled.4337- `internal/site-guide.md` is the long version of all this, written for an llm to read before helping out.
_headers
+0 −3
@@ -3,6 +3,3 @@3344/.well-known/atproto-did55 Content-Type: text/plain; charset=utf-867/.well-known/site.standard.publication8 Content-Type: text/plain; charset=utf-8
_routes.jsondeleted
+0 −5
@@ -1,5 +0,0 @@1{2 "version": 1,3 "include": ["/about/*", "/now/*", "/blog/*", "/api/*"],4 "exclude": []5}
about/index.html
+0 −10
@@ -95,7 +95,6 @@9595 name="twitter:image:alt"9696 content="daniel daum - software engineer, avid reader, aspiring game dev - danieldaum.net"9797 />98 <link rel="site.standard.document" href="at://did:plc:e3z5gj5iyuwgqao562bo4bdf/site.standard.document/3mu5cslx622sk" />9998 </head>10099101100 <body>@@ -214,15 +213,6 @@214213 food, or video games. My email is in the footer below.215214 </p>216215 </section>217218 <section219 class="post-social"220 id="comments"221 data-social222 aria-label="likes and comments"223 >224 <p class="meta">likes and comments unavailable</p>225 </section>226216 </article>227217228218 <nav class="pager" aria-label="post navigation">
blog/index.html
+3 −19
@@ -9,7 +9,7 @@99 />1010 <meta1111 http-equiv="Content-Security-Policy"12 content="default-src 'self'; style-src 'self'; font-src 'self'; img-src 'self' https://assets.danieldaum.net https://pds.danieldaum.net https://cdn.bsky.app https://video.bsky.app https://video.cdn.bsky.app; media-src 'self' https://assets.danieldaum.net;"12 content="default-src 'self'; style-src 'self'; font-src 'self'; img-src 'self' https://assets.danieldaum.net; media-src 'self' https://assets.danieldaum.net;"1313 />1414 <meta name="referrer" content="strict-origin-when-cross-origin" />1515 <link@@ -118,27 +118,11 @@118118 <header class="page-header">119119 <h1><span aria-hidden="true">/</span>blog</h1>120120 <p class="meta">121 Things I've written — short posts, long-form writing,122 and notes on what I've played, watched and read.121 Things I've written — long-form writing and notes on122 what I've played, watched and read.123123 </p>124124 </header>125125126 <!-- POSTS: filled by scripts/sync-posts.mjs -->127 <section aria-labelledby="blog-posts">128 <h2 class="section-label" id="blog-posts">posts</h2>129 <!-- posts:highlight -->130 <a class="post-card" href="/posts/#3mxinhl6tzk22">131 <span class="post-card-meta">132 <span>@danieldaum.net</span>133 <time datetime="2026-10-10T04:25:33.268Z">9 Oct 2026, 9:25 pm</time>134 </span>135 <span class="post-card-text">gif</span>136 <span class="post-card-extra">gif</span>137 </a>138 <!-- /posts:highlight -->139 <p class="post-feed-more caps"><a href="/posts/">all posts →</a></p>140 </section>141142126 <!-- WRITING, newest first: long-form posts and, later, notes143127 (reviews). a note row links to the media page and is tagged144128 #game, #movie, #show, #book or #album. notes never go in
changelog/index.html
+14 −0
@@ -110,6 +110,20 @@110110 <p class="meta">Tracking the changes to this website</p>111111 </header>112112 <section>113 <blockquote>114 <h2>v0.6.0 — 2026-10-13 — static again</h2>115 <p class="meta">116 no more micro posts, likes, or comments117 </p>118119 <p>120 Micro posts, likes, comments by email, and the hourly121 sync behind them are gone. The site is plain HTML and122 CSS again, with nothing running on a server, and the123 privacy page is shorter for it.124 </p>125 </blockquote>126 <hr />113127 <blockquote>114128 <h2>v0.5.0 — 2026-10-08 — comments and a cleaner look</h2>115129 <p class="meta">
functions/_lib/comments.jsdeleted
+0 −82
@@ -1,82 +0,0 @@1// shared by _middleware.js and api/moderate.js23// everything from d1 or a request goes through this before it is written4// into a page5export function escapeHtml(str) {6 return String(str)7 .replace(/&/g, "&")8 .replace(/</g, "<")9 .replace(/>/g, ">")10 .replace(/"/g, """);11}1213// a stored comment as paragraphs: blank lines split paragraphs, single14// newlines become <br>15export function bodyHtml(body) {16 return body17 .split(/\n{2,}/)18 .map((para) => `<p>${escapeHtml(para).replace(/\n/g, "<br />")}</p>`)19 .join("");20}2122// approved comments for one page, oldest first, as a one-level thread plus23// the heading count and the "comment by email" footer. key passed24// isLikeable(), so it is safe to write into the page as-is25export function renderComments(key, rows) {26 const replies = new Map();27 for (const row of rows) {28 if (row.parent) {29 replies.set(row.parent, [...(replies.get(row.parent) || []), row]);30 }31 }32 const top = rows.filter((row) => !row.parent);33 const thread = (list) => `<ol class="comment-thread">${list.map((row) => `<li>${comment(row, replies.get(row.id))}</li>`).join("")}</ol>`;3435 const title = rows.length === 0 ? "no comments yet" : rows.length === 1 ? "1 comment" : `${rows.length} comments`;36 return {37 title,38 thread: top.length ? thread(top) : "",39 foot: `<div class="social-foot">40 <a class="comment-link" href="${mailto(key)}">comment by email →</a>41 <p class="meta">Start with a "name:" line for your display name. Your email is never shown or stored</p>42</div>`,43 };4445 function comment(row, children) {46 const id = `comment-${row.id}`;47 return `<article class="comment" id="${id}">48 <p class="meta">49 <span class="comment-name">${escapeHtml(row.name)}</span>${row.is_author ? `<span class="comment-author">author</span>` : ""}50 <a class="comment-time" href="#${id}"><time datetime="${escapeHtml(row.created_at)}">${when(row.created_at)}</time></a>51 </p>52 <div class="comment-body">${bodyHtml(row.body)}</div>53 <a class="comment-link" href="${mailto(key + "#" + id)}">reply →</a>54 ${children ? thread(children) : ""}55</article>`;56 }57}5859// the subject is what the email worker reads to know where a comment goes;60// the body starts with an empty name line as a hint61function mailto(target) {62 const subject = encodeURIComponent(`re: https://danieldaum.net${target}`);63 return `mailto:reply@replies.danieldaum.net?subject=${subject}&body=${encodeURIComponent("name: ")}`;64}6566// "4 Sep 2026 · 09:12", oakland time67function when(iso) {68 const parts = Object.fromEntries(69 new Intl.DateTimeFormat("en-GB", {70 timeZone: "America/Los_Angeles",71 day: "numeric",72 month: "short",73 year: "numeric",74 hour: "2-digit",75 minute: "2-digit",76 hourCycle: "h23",77 })78 .formatToParts(new Date(iso))79 .map((p) => [p.type, p.value])80 );81 return `${parts.day} ${parts.month} ${parts.year} · ${parts.hour}:${parts.minute}`;82}
functions/_lib/hmac.jsdeleted
+0 −33
@@ -1,33 +0,0 @@1// keyed sha-256 hash as hex. shared by likes, comment moderation and the2// email worker (workers/comments imports this file), so signatures made on3// one side always match on the other45export async function hmacHex(secret, message) {6 if (!secret) {7 throw new Error("SOCIAL_SECRET is not set");8 }9 const enc = new TextEncoder();10 const key = await crypto.subtle.importKey(11 "raw",12 enc.encode(secret),13 { name: "HMAC", hash: "SHA-256" },14 false,15 ["sign"]16 );17 const sig = await crypto.subtle.sign("HMAC", key, enc.encode(message));18 return [...new Uint8Array(sig)].map((b) => b.toString(16).padStart(2, "0")).join("");19}2021// checks a signature from a link. compares every character so the time taken22// doesn't reveal how much of a guess was right23export async function hmacMatches(secret, message, sig) {24 const expected = await hmacHex(secret, message);25 if (typeof sig !== "string" || sig.length !== expected.length) {26 return false;27 }28 let diff = 0;29 for (let i = 0; i < sig.length; i++) {30 diff |= sig.charCodeAt(i) ^ expected.charCodeAt(i);31 }32 return diff === 0;33}
functions/_lib/likes.jsdeleted
+0 −19
@@ -1,19 +0,0 @@1// shared by _middleware.js and api/like.js23import { hmacHex } from "./hmac.js";45// pages that can carry likes: /about/, /now/, /now/<slug>/, /blog/<slug>/.6// never /blog/ itself7export function isLikeable(pathname) {8 return /^\/(about|now)\/$|^\/(blog|now)\/[a-z0-9-]+\/$/.test(pathname);9}1011// one like per visitor per post per day, without cookies or stored ips:12// a keyed hash of ip + browser + today's date. it can't be reversed, and it13// stops matching at utc midnight.14export async function voterId(secret, request) {15 const ip = request.headers.get("CF-Connecting-IP") || "";16 const ua = request.headers.get("User-Agent") || "";17 const day = new Date().toISOString().slice(0, 10);18 return hmacHex(secret, `${ip}|${ua}|${day}`);19}
functions/_middleware.jsdeleted
+0 −89
@@ -1,89 +0,0 @@1// runs in front of /about/, /now/*, /blog/* and /api/* (see _routes.json).2// on likeable pages it reads likes and approved comments from d1 and writes3// them into the page's [data-social] placeholder. if anything fails, the4// page is served untouched with its fallback text.56import { isLikeable, voterId } from "./_lib/likes.js";7import { renderComments } from "./_lib/comments.js";89export async function onRequest(context) {10 const { request, env } = context;11 const { pathname } = new URL(request.url);12 if (!isLikeable(pathname)) {13 return context.next();14 }1516 // drop conditional headers: the static file never changes, so the asset17 // server would answer 304 and the browser would show a stale count18 const fresh = new Request(request);19 fresh.headers.delete("If-None-Match");20 fresh.headers.delete("If-Modified-Since");21 const response = await context.next(fresh);2223 if (!(response.headers.get("content-type") || "").includes("text/html")) {24 return response;25 }2627 let voter;28 try {29 voter = await voterId(env.SOCIAL_SECRET, request);30 } catch {31 return response;32 }3334 const page = new HTMLRewriter()35 .on("[data-social]", {36 async element(el) {37 // the placeholder can name another page, e.g. /now/ shows38 // /now/sep-2026/'s likes and comments. empty means this page.39 const key = el.getAttribute("data-social") || pathname;40 if (!isLikeable(key)) {41 return;42 }43 try {44 const [count, liked, comments] = await env.DB.batch([45 env.DB.prepare("SELECT count FROM Likes WHERE page = ?").bind(key),46 env.DB.prepare("SELECT 1 FROM LikeVoters WHERE page = ? AND voter = ?").bind(key, voter),47 env.DB48 .prepare("SELECT id, parent, name, body, is_author, created_at FROM Comments WHERE page = ? AND approved = 1 ORDER BY created_at")49 .bind(key),50 ]);51 const likes = {52 count: Number(count.results[0]?.count ?? 0),53 liked: liked.results.length > 0,54 };55 const { title, thread, foot } = renderComments(key, comments.results);56 el.setInnerContent(57 `<div class="social-head"><h2 class="social-title">${title}</h2>${renderLikes(key, likes)}</div>${thread}${foot}`,58 { html: true }59 );60 } catch {61 // leave the fallback text62 }63 },64 })65 .transform(response);6667 // the like state is per visitor and changes on submit, so the back button68 // must not show a cached copy69 const out = new Response(page.body, page);70 out.headers.set("Cache-Control", "private, no-cache");71 out.headers.delete("ETag");72 return out;73}7475// key already passed isLikeable(), so it is [a-z0-9-/] only and safe to76// write into the page as-is77function renderLikes(key, { count, liked }) {78 const noun = count === 1 ? "like" : "likes";79 const label = liked ? `you liked this post, ${count} ${noun}` : `like this post, ${count} ${noun}`;80 const state = liked ? ` disabled aria-pressed="true"` : "";81 return `<form class="like-form" id="likes" method="POST" action="/api/like">82 <input type="hidden" name="path" value="${key}" />83 <button type="submit" class="like-button" aria-label="${label}"${state}>${HEART} ${count}</button>84</form>`;85}8687// outline by default, filled once liked (see .like-icon in global.css).88// path from feather icons, mit89const HEART = `<svg class="like-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" /></svg>`;
functions/api/like.jsdeleted
+0 −55
@@ -1,55 +0,0 @@1// POST /api/like: records one like and sends the visitor back to the post.2// there is no GET handler on purpose, so crawlers and link prefetchers can3// never add a like.45import { isLikeable, voterId } from "../_lib/likes.js";67// voter rows only matter for the day they were made; keep two days so the8// purge never races utc midnight9const VOTER_TTL_MS = 2 * 24 * 60 * 60 * 1000;1011export async function onRequestPost(context) {12 const { request, env } = context;1314 let path;15 try {16 path = (await request.formData()).get("path");17 } catch {18 return plain("bad request", 400);19 }20 if (typeof path !== "string" || !isLikeable(path)) {21 return plain("bad request", 400);22 }2324 // no counter rows for pages that don't exist25 const { origin } = new URL(request.url);26 const exists = await env.ASSETS.fetch(new Request(origin + path));27 if (exists.status !== 200) {28 return plain("not found", 404);29 }3031 const now = new Date();32 const voter = await voterId(env.SOCIAL_SECRET, request);33 const cutoff = new Date(now.getTime() - VOTER_TTL_MS).toISOString();3435 const [inserted] = await env.DB.batch([36 env.DB37 .prepare("INSERT OR IGNORE INTO LikeVoters (page, voter, created_at) VALUES (?, ?, ?)")38 .bind(path, voter, now.toISOString()),39 env.DB.prepare("DELETE FROM LikeVoters WHERE created_at < ?").bind(cutoff),40 ]);4142 // a repeat like today is a silent no-op43 if (inserted.meta.changes === 1) {44 await env.DB45 .prepare("INSERT INTO Likes (page, count) VALUES (?, 1) ON CONFLICT(page) DO UPDATE SET count = count + 1")46 .bind(path)47 .run();48 }4950 return new Response(null, { status: 303, headers: { Location: path + "#likes" } });51}5253function plain(body, status) {54 return new Response(body, { status, headers: { "Content-Type": "text/plain; charset=utf-8" } });55}
functions/api/moderate.jsdeleted
+0 −101
@@ -1,101 +0,0 @@1// /api/moderate: the link in a new-comment email lands here.2// GET only shows the comment with approve / delete buttons, because mail apps3// and link scanners open links on their own. the buttons POST. both need the4// signature from the email, so nobody else can use this page.56import { hmacMatches } from "../_lib/hmac.js";7import { bodyHtml, escapeHtml } from "../_lib/comments.js";89const ID_RE = /^[0-9a-f-]{36}$/;1011export async function onRequestGet({ request, env }) {12 const params = new URL(request.url).searchParams;13 const id = params.get("id");14 const sig = params.get("sig");15 if (!(await authorized(env, id, sig))) {16 return forbidden();17 }1819 const comment = await env.DB.prepare("SELECT page, name, body, approved FROM Comments WHERE id = ?").bind(id).first();20 if (!comment) {21 return page(`<p>This comment has already been deleted.</p>`);22 }2324 const hidden = `<input type="hidden" name="id" value="${id}" /><input type="hidden" name="sig" value="${escapeHtml(sig)}" />`;25 return page(`26 <p class="meta">${escapeHtml(comment.name)} on <a href="${comment.page}">${comment.page}</a>, ${comment.approved ? "approved" : "waiting for approval"}</p>27 <blockquote>${bodyHtml(comment.body)}</blockquote>28 <div class="moderate-actions">29 ${comment.approved ? "" : `<form method="POST">${hidden}<button class="like-button" name="action" value="approve">approve</button></form>`}30 <form method="POST">${hidden}<button class="like-button" name="action" value="delete">delete</button></form>31 </div>`);32}3334export async function onRequestPost({ request, env }) {35 let form;36 try {37 form = await request.formData();38 } catch {39 return forbidden();40 }41 const id = form.get("id");42 if (!(await authorized(env, id, form.get("sig")))) {43 return forbidden();44 }4546 const comment = await env.DB.prepare("SELECT page FROM Comments WHERE id = ?").bind(id).first();47 if (!comment) {48 return page(`<p>This comment has already been deleted.</p>`);49 }5051 if (form.get("action") === "approve") {52 await env.DB.prepare("UPDATE Comments SET approved = 1 WHERE id = ?").bind(id).run();53 return new Response(null, { status: 303, headers: { Location: `${comment.page}#comment-${id}` } });54 }5556 // gone for good, along with any replies to it57 await env.DB.prepare("DELETE FROM Comments WHERE id = ? OR parent = ?").bind(id, id).run();58 return page(`<p>Deleted. <a href="${comment.page}">Back to the post</a></p>`);59}6061async function authorized(env, id, sig) {62 return typeof id === "string" && ID_RE.test(id) && (await hmacMatches(env.SOCIAL_SECRET, "moderate:" + id, sig));63}6465function forbidden() {66 return new Response("forbidden", { status: 403, headers: { "Content-Type": "text/plain; charset=utf-8" } });67}6869// page paths in d1 passed isLikeable() on the way in, so they are safe to70// write into the page as-is71function page(content) {72 const html = `<!DOCTYPE html>73<html lang="en">7475<head>76 <meta charset="UTF-8" />77 <meta name="viewport" content="width=device-width, initial-scale=1.0" />78 <meta name="robots" content="noindex" />79 <meta http-equiv="Content-Security-Policy" content="default-src 'self'; style-src 'self'; font-src 'self';" />80 <meta name="referrer" content="no-referrer" />81 <link rel="stylesheet" href="/global.css" />82 <link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon/favicon-32x32.png" />83 <title>daniel daum - moderate</title>84</head>8586<body>87 <main id="main">88 <header class="page-header">89 <h1><span aria-hidden="true">/</span>moderate</h1>90 </header>91 <section>${content}92 </section>93 </main>94</body>9596</html>97`;98 return new Response(html, {99 headers: { "Content-Type": "text/html; charset=utf-8", "Cache-Control": "no-store" },100 });101}
global.css
+2 −442
@@ -734,437 +734,6 @@ article:has(> .page-header--post) {734734 padding: 0;735735}736736737/*============================*/738/* components - likes + comments */739/*============================*/740741/* filled in by functions/_middleware.js: comment count and like button in742 one row under a dashed rule, then the thread, then the email footer */743.post-social {744 margin-top: 3rem;745 padding-top: 1.25rem;746 border-top: 1px dashed var(--borders);747}748749.post-social > .meta {750 margin: 0;751}752753.social-head {754 display: flex;755 justify-content: space-between;756 align-items: center;757 gap: 1rem;758 margin-bottom: 0.5rem;759}760761.social-title {762 margin: 0;763 font-size: 0.78rem;764 font-weight: 600;765 letter-spacing: 0.12em;766 color: var(--text-secondary);767}768769.comment-thread {770 list-style: none;771 margin: 0;772 padding: 0;773}774775.comment-thread li {776 margin: 0;777}778779/* replies: one level, indented on a rule */780.comment-thread .comment-thread {781 margin-top: 0.25rem;782 padding-left: 1rem;783 border-left: 1px solid var(--borders);784}785786.comment {787 padding: 1rem 0;788}789790.comment .meta {791 display: flex;792 flex-wrap: wrap;793 gap: 0.25rem 0.75rem;794 margin: 0 0 0.5rem;795 font-size: 0.78rem;796 letter-spacing: 0.04em;797}798799.comment-name {800 color: var(--text-headings);801 font-weight: 600;802}803804.comment-author {805 padding: 0 0.35rem;806 border: 1px solid var(--borders);807 font-size: 0.7rem;808 letter-spacing: 0.08em;809 color: var(--accent);810}811812.comment-time {813 color: var(--text-secondary);814}815816.comment-time:hover {817 color: var(--accent);818}819820.comment-body p {821 margin: 0 0 0.5rem;822}823824.comment-link {825 font-size: 0.75rem;826 letter-spacing: 0.08em;827}828829/* same highlight as text links */830.comment-link:hover {831 color: var(--background-dark);832 background-color: var(--accent);833}834835.social-foot {836 display: flex;837 flex-wrap: wrap;838 justify-content: space-between;839 align-items: baseline;840 gap: 0.5rem 1rem;841 margin-top: 1.5rem;842}843844.social-foot .meta {845 margin: 0;846 font-size: 0.8rem;847}848849/* /api/moderate's buttons */850.moderate-actions {851 display: flex;852 gap: 0.75rem;853}854855.like-form {856 margin: 0;857}858859.like-button {860 display: inline-flex;861 align-items: center;862 gap: 0.4rem;863 min-height: 2.25rem;864 padding: 0 0.85rem;865 border: 1px solid var(--borders);866 background: none;867 color: var(--text-secondary);868 font-size: 0.85rem;869 letter-spacing: 0.06em;870 cursor: pointer;871 transition:872 color 150ms ease,873 border-color 150ms ease;874}875876.like-button:hover {877 color: var(--accent);878 border-color: var(--accent);879}880881/* already liked today: a state, not an error */882.like-button:disabled {883 color: var(--accent);884 border-color: var(--borders);885 cursor: default;886}887888.like-icon {889 width: 0.95em;890 height: 0.95em;891 fill: none;892 stroke: currentColor;893 stroke-width: 2;894 stroke-linejoin: round;895}896897.like-button:disabled .like-icon {898 fill: currentColor;899}900901/*============================*/902/* components - posts feed */903/*============================*/904905/* written by scripts/sync-posts.mjs from my bluesky posts. a quiet log:906 dashed rules between posts, grey meta row, lime only on links */907.post-item {908 display: flex;909 flex-direction: column;910 gap: 0.75rem;911 padding: 1.5rem 0;912 scroll-margin-top: 1rem;913}914915.post-item + .post-item {916 border-top: 1px dashed var(--borders);917}918919/* arriving from a permalink: the post sits in the panel colour */920.post-item:target {921 margin-inline: -1rem;922 padding-inline: 1rem;923 background-color: var(--surface);924 box-shadow: inset 2px 0 0 var(--accent);925}926927/* time left, reply right; both grey until hovered, like the footer */928.post-item-meta {929 display: flex;930 flex-wrap: wrap;931 justify-content: space-between;932 align-items: baseline;933 gap: 0.25rem 1rem;934 margin: 0;935 font-size: 0.75rem;936 letter-spacing: 0.08em;937}938939.post-item-time,940.post-item-reply {941 color: var(--text-secondary);942 border-bottom: 1px solid transparent;943 transition:944 color 150ms ease,945 border-bottom-color 150ms ease;946}947948.post-item-time:hover,949.post-item-reply:hover {950 color: var(--accent);951 border-bottom-color: var(--accent);952}953954.post-item-body {955 margin: 0;956}957958/* one image keeps its shape, and so do gifs and videos */959.post-item-media img,960.post-item-video img,961.post-item-gif > *,962.post-item-player {963 width: auto;964 height: auto;965 max-height: 26rem;966 border: 1px solid var(--borders);967 border-radius: 2px;968}969970.post-item-gif,971.post-item-player {972 align-self: flex-start;973}974975/* gif: the video loops. with reduced motion, the still frame stands in */976.post-item-gif > img {977 display: none;978}979980@media (prefers-reduced-motion: reduce) {981 .post-item-gif:has(> img) > video {982 display: none;983 }984985 .post-item-gif > img {986 display: block;987 }988}989990/* two or more: a cropped grid, two across */991.post-item-media--grid {992 display: grid;993 grid-template-columns: 1fr 1fr;994 gap: 0.4rem;995}996997.post-item-media--grid img {998 width: 100%;999 height: 100%;1000 aspect-ratio: 1;1001 object-fit: cover;1002}10031004/* a video that plays on bluesky (someone else's): its thumbnail with a play1005 mark, linking out */1006.post-item-video {1007 position: relative;1008 align-self: flex-start;1009}10101011.post-item-video::after {1012 content: "\25B6";1013 position: absolute;1014 inset: 50% auto auto 50%;1015 translate: -50% -50%;1016 display: grid;1017 place-items: center;1018 width: 3rem;1019 height: 3rem;1020 padding-left: 0.2rem;1021 border: 1px solid var(--borders);1022 background-color: color-mix(in srgb, var(--background-dark) 80%, transparent);1023 color: var(--text-headings);1024 font-size: 1rem;1025 transition:1026 color 150ms ease,1027 border-color 150ms ease;1028}10291030.post-item-video:hover::after {1031 color: var(--accent);1032 border-color: var(--accent);1033}10341035/* link cards and quoted posts */1036.post-item-card {1037 display: flex;1038 flex-direction: column;1039 gap: 0.3rem;1040 padding: 0.875rem 1rem;1041 border: 1px solid var(--borders);1042 background-color: var(--surface);1043 transition: border-color 150ms ease;1044}10451046.post-item-card:hover {1047 border-color: var(--accent);1048}10491050.post-item-card-title {1051 color: var(--text-headings);1052 font-size: 0.9375rem;1053}10541055.post-item-card-desc,1056.post-item-quote-text {1057 color: var(--text-body);1058 font-size: 0.85rem;1059 line-height: 1.55;1060 display: -webkit-box;1061 -webkit-box-orient: vertical;1062 -webkit-line-clamp: 2;1063 overflow: hidden;1064}10651066.post-item-quote-text {1067 -webkit-line-clamp: 4;1068}10691070.post-item-card-meta {1071 color: var(--text-secondary);1072 font-size: 0.75rem;1073 letter-spacing: 0.04em;1074}10751076.post-item-quote .post-item-card-meta {1077 color: var(--text-headings);1078}10791080.post-item-quote .post-item-card-meta span {1081 color: var(--text-secondary);1082}10831084.post-item-note {1085 margin: 0;1086 font-size: 0.85rem;1087}10881089/* a repost: small label before the time, the original post in a panel */1090.post-item-label {1091 margin-right: 0.5rem;1092 color: var(--text-secondary);1093}10941095.post-item-label::before {1096 content: "\21BB\00A0";1097}10981099.post-item-repost {1100 display: flex;1101 flex-direction: column;1102 gap: 0.75rem;1103 padding: 1rem;1104 border: 1px solid var(--borders);1105 background-color: var(--surface);1106}11071108.post-item-repost > .post-item-card-meta {1109 margin: 0;1110 color: var(--text-headings);1111}11121113.post-item-repost > .post-item-card-meta span {1114 color: var(--text-secondary);1115}11161117/* cards inside the panel step back down to the page colour */1118.post-item-repost .post-item-card {1119 background-color: var(--background-dark);1120}11211122/* "all posts ->" under the post card on / and /blog/ */1123.post-feed-more {1124 margin: 1rem 0 0;1125 font-size: 0.85rem;1126}11271128/* the newest post on / and /blog/: a small panel, set apart from the1129 lists around it */1130.post-card {1131 display: flex;1132 flex-direction: column;1133 gap: 0.5rem;1134 padding: 1rem 1.25rem;1135 border: 1px solid var(--borders);1136 background-color: var(--surface);1137 transition: border-color 150ms ease;1138}11391140.post-card:hover {1141 border-color: var(--accent);1142}11431144.post-card-meta {1145 display: flex;1146 flex-wrap: wrap;1147 justify-content: space-between;1148 gap: 0.25rem 1rem;1149}11501151.post-card-meta,1152.post-card-extra {1153 font-size: 0.72rem;1154 letter-spacing: 0.08em;1155 color: var(--text-secondary);1156}11571158.post-card-text {1159 color: var(--text-headings);1160 font-size: 0.9375rem;1161 line-height: 1.6;1162 display: -webkit-box;1163 -webkit-box-orient: vertical;1164 -webkit-line-clamp: 4;1165 overflow: hidden;1166}11671168737/*============================*/1169738/* components - pager */1170739/*============================*/@@ -2031,8 +1600,8 @@ figure:has(.img-scaled) figcaption {20311600/* projects - commit log */20321601/*============================*/203316022034/* recent commits, written by scripts/sync-commits.mjs. stands in for a2035 screenshot: in the project banner and on the /projects/ card */1603/* recent commits, written by hand. stands in for a screenshot: in the1604 project banner and on the /projects/ card */20361605.commit-log {20371606 position: relative;20381607 width: 100%;@@ -2657,18 +2226,9 @@ footer nav a,26572226.photo-caption-date,26582227.lightbox-details,26592228.tracker-caption-line,2660.social-title,2661.comment-author,2662.comment-time,2663.comment-link,2664.post-item-time,2665.post-item-reply,2666.post-item-label,26672229.archive-title,26682230.archive-tag,26692231.archive-date,2670.post-card-meta,2671.post-card-extra,26722232.pill,26732233.commit-log-head,26742234.commit-log-date {
index.html
+1 −17
@@ -9,7 +9,7 @@99 />1010 <meta1111 http-equiv="Content-Security-Policy"12 content="default-src 'self'; style-src 'self'; font-src 'self'; img-src 'self' https://assets.danieldaum.net https://pds.danieldaum.net https://cdn.bsky.app https://video.bsky.app https://video.cdn.bsky.app; media-src 'self' https://assets.danieldaum.net;"12 content="default-src 'self'; style-src 'self'; font-src 'self'; img-src 'self' https://assets.danieldaum.net; media-src 'self' https://assets.danieldaum.net;"1313 />1414 <meta name="referrer" content="strict-origin-when-cross-origin" />1515 <link@@ -126,22 +126,6 @@126126 </p>127127 </header>128128129 <!-- LATEST POST: filled by scripts/sync-posts.mjs -->130 <section aria-labelledby="home-post">131 <h2 class="section-label" id="home-post">latest post</h2>132 <!-- posts:highlight -->133 <a class="post-card" href="/posts/#3mxinhl6tzk22">134 <span class="post-card-meta">135 <span>@danieldaum.net</span>136 <time datetime="2026-10-10T04:25:33.268Z">9 Oct 2026, 9:25 pm</time>137 </span>138 <span class="post-card-text">gif</span>139 <span class="post-card-extra">gif</span>140 </a>141 <!-- /posts:highlight -->142 <p class="post-feed-more caps"><a href="/posts/">all posts →</a></p>143 </section>144145129 <!-- RECENT WRITING -->146130 <section aria-label="recent writing">147131 <h2 class="section-label">recent writing</h2>
internal/example.html
+0 −14
@@ -147,20 +147,6 @@147147 and changes. Come back soon.148148 </p>149149 </section>150151 <!-- a static copy of what functions/_middleware.js writes in -->152 <section class="post-social" aria-label="likes and comments">153 <div class="social-head">154 <h2 class="social-title">no comments yet</h2>155 <form class="like-form">156 <button type="button" class="like-button" aria-label="like this post, 0 likes"><svg class="like-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" /></svg> 0</button>157 </form>158 </div>159 <div class="social-foot">160 <a class="comment-link" href="#main">comment by email →</a>161 <p class="meta">Start with a "name:" line for your display name. Your email is never shown or stored</p>162 </div>163 </section>164150 </article>165151166152 <nav class="pager" aria-label="post navigation">
internal/palettes.html
+0 −53
@@ -44,10 +44,6 @@4444 color: var(--text-secondary);4545 }464647 .option .post-social {48 margin-top: 2rem;49 }505147 .option--borderless article:has(> .page-header--post),5248 .option--borderless .pager-link {5349 border-color: transparent;@@ -85,13 +81,6 @@8581 on the Steam Deck</li>8682 </ul>8783 </section>88 <section class="post-social" aria-label="likes and comments">89 <div class="social-head">90 <h2 class="social-title">no comments yet</h2>91 <button type="button" class="like-button"><svg class="like-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" /></svg> 0</button>92 </div>93 <div class="social-foot"><a class="comment-link" href="#main">comment by email →</a></div>94 </section>9584 </article>9685 <nav class="pager" aria-label="pager">9786 <a class="pager-link pager-prev" href="#main"><span class="pager-label">← previous</span><span class="pager-title">Let Me Introduce Myself</span></a>@@ -118,13 +107,6 @@118107 on the Steam Deck</li>119108 </ul>120109 </section>121 <section class="post-social" aria-label="likes and comments">122 <div class="social-head">123 <h2 class="social-title">no comments yet</h2>124 <button type="button" class="like-button"><svg class="like-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" /></svg> 0</button>125 </div>126 <div class="social-foot"><a class="comment-link" href="#main">comment by email →</a></div>127 </section>128110 </article>129111 <nav class="pager" aria-label="pager">130112 <a class="pager-link pager-prev" href="#main"><span class="pager-label">← previous</span><span class="pager-title">Let Me Introduce Myself</span></a>@@ -151,13 +133,6 @@151133 on the Steam Deck</li>152134 </ul>153135 </section>154 <section class="post-social" aria-label="likes and comments">155 <div class="social-head">156 <h2 class="social-title">no comments yet</h2>157 <button type="button" class="like-button"><svg class="like-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" /></svg> 0</button>158 </div>159 <div class="social-foot"><a class="comment-link" href="#main">comment by email →</a></div>160 </section>161136 </article>162137 <nav class="pager" aria-label="pager">163138 <a class="pager-link pager-prev" href="#main"><span class="pager-label">← previous</span><span class="pager-title">Let Me Introduce Myself</span></a>@@ -184,13 +159,6 @@184159 on the Steam Deck</li>185160 </ul>186161 </section>187 <section class="post-social" aria-label="likes and comments">188 <div class="social-head">189 <h2 class="social-title">no comments yet</h2>190 <button type="button" class="like-button"><svg class="like-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" /></svg> 0</button>191 </div>192 <div class="social-foot"><a class="comment-link" href="#main">comment by email →</a></div>193 </section>194162 </article>195163 <nav class="pager" aria-label="pager">196164 <a class="pager-link pager-prev" href="#main"><span class="pager-label">← previous</span><span class="pager-title">Let Me Introduce Myself</span></a>@@ -217,13 +185,6 @@217185 on the Steam Deck</li>218186 </ul>219187 </section>220 <section class="post-social" aria-label="likes and comments">221 <div class="social-head">222 <h2 class="social-title">no comments yet</h2>223 <button type="button" class="like-button"><svg class="like-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" /></svg> 0</button>224 </div>225 <div class="social-foot"><a class="comment-link" href="#main">comment by email →</a></div>226 </section>227188 </article>228189 <nav class="pager" aria-label="pager">229190 <a class="pager-link pager-prev" href="#main"><span class="pager-label">← previous</span><span class="pager-title">Let Me Introduce Myself</span></a>@@ -250,13 +211,6 @@250211 on the Steam Deck</li>251212 </ul>252213 </section>253 <section class="post-social" aria-label="likes and comments">254 <div class="social-head">255 <h2 class="social-title">no comments yet</h2>256 <button type="button" class="like-button"><svg class="like-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" /></svg> 0</button>257 </div>258 <div class="social-foot"><a class="comment-link" href="#main">comment by email →</a></div>259 </section>260214 </article>261215 <nav class="pager" aria-label="pager">262216 <a class="pager-link pager-prev" href="#main"><span class="pager-label">← previous</span><span class="pager-title">Let Me Introduce Myself</span></a>@@ -283,13 +237,6 @@283237 on the Steam Deck</li>284238 </ul>285239 </section>286 <section class="post-social" aria-label="likes and comments">287 <div class="social-head">288 <h2 class="social-title">no comments yet</h2>289 <button type="button" class="like-button"><svg class="like-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" /></svg> 0</button>290 </div>291 <div class="social-foot"><a class="comment-link" href="#main">comment by email →</a></div>292 </section>293240 </article>294241 <nav class="pager" aria-label="pager">295242 <a class="pager-link pager-prev" href="#main"><span class="pager-label">← previous</span><span class="pager-title">Let Me Introduce Myself</span></a>
internal/site-guide.md
+25 −72
@@ -6,10 +6,9 @@ A guide for an assistant helping me with danieldaum.net. Read all of it before c6677- Handwritten HTML and one stylesheet (`global.css`). No framework, no build step, and no JavaScript on public pages.88- The source lives on Tangled: https://tangled.org/danieldaum.net/saturn (`origin`, `git@tangled.org:danieldaum.net/saturn`). GitHub and my Gitea are read-only mirrors.9- Hosting is Cloudflare Pages. Pushing to `main` on Tangled runs `.tangled/workflows/deploy.yml` on the public spindle. It copies every tracked file except `internal/`, `scripts/`, `workers/`, `.tangled/`, `.gitignore` and `mise.toml`, and deploys them. CI details are in section 8.9- Hosting is Cloudflare Pages. Pushing to `main` on Tangled runs `.tangled/workflows/deploy.yml` on the public spindle. It copies every tracked file except `internal/`, `scripts/`, `.tangled/`, `.gitignore` and `mise.toml`, and deploys them. CI details are in section 6.1010- Images live on R2, served from `https://assets.danieldaum.net/img/...`. Photos are `img/photos/<name>.webp`.11- Likes and comments come from `functions/_middleware.js` and a D1 database. They work on `/about/`, `/now/`, `/now/<slug>/` and `/blog/<slug>/`, with no setup per post.12- My Bluesky account runs on my own PDS: `https://pds.danieldaum.net`, DID `did:plc:e3z5gj5iyuwgqao562bo4bdf`, handle `danieldaum.net`.11- `.well-known/atproto-did` verifies my Bluesky handle (`danieldaum.net`, DID `did:plc:e3z5gj5iyuwgqao562bo4bdf`). Leave it alone.1312- Local preview: `mise run serve`, then open http://localhost:8080.14131514## rules that matter@@ -18,7 +17,6 @@ A guide for an assistant helping me with danieldaum.net. Read all of it before c1817- **Caps are CSS only.** Write normal case in HTML. Elements that show in caps are listed in the caps rule near the end of `global.css`, and the `.caps` class does the same for anything else.1918- **Links.** Internal links end in a slash (`/now/sep-2026/`). Underlines only apply to links without a class inside `p`, `li`, `td`, `dd`, `blockquote` and `figcaption`. Links with a class style themselves.2019- **Colour.** Lime (`--accent`) is for navigation and actions only. Labels, tags and dates are grey.21- **Don't edit between sync markers.** `<!-- posts:all -->`, `<!-- posts:highlight -->`, `<!-- commits:holonet:6 -->` and the matching closing comments are rewritten by a script on every sync.2220- **Style guide.** `internal/styles.html` shows every component. Update it when a component changes.2321- **Never commit or push for me.** Show me the changes and I'll commit them.2422@@ -29,9 +27,8 @@ First person, casual and plain. Short sentences, the odd exclamation mark, and d2927## folders30283129```32index.html home: latest post card, recent writing, projects33blog/index.html posts card, then the writing list (ol.archive)34posts/index.html every bluesky post (written by scripts/sync-posts.mjs)30index.html home: recent writing, projects31blog/index.html the writing list (ol.archive)3532now/index.html a copy of the newest now post3633now/<slug>/ now posts (now/jan-2026/, now/sep-2026/)3734about/ about page (a post, with a 3-photo banner row)@@ -41,45 +38,21 @@ projects/ project cards + projects/<name>/ pages (saturn, holonet, r4138garden/ ratings/ changelog/ privacy/4239feed.xml atom feed, long-form posts only4340internal/ never deployed: template.html, example.html, styles.html, this guide44scripts/ sync-posts.mjs, sync-commits.mjs, sync-standard.mjs, word-count.py45.tangled/workflows/ deploy.yml, mirror.yml, sync.yml (ci, see section 8)46.well-known/ atproto-did, site.standard.publication41scripts/ word-count.py42.tangled/workflows/ deploy.yml, mirror.yml (ci, see section 6)43.well-known/ atproto-did4744```48454946---504751## 1. posting on bluesky52531. Post on Bluesky.5455That's it. The sync pipeline runs once an hour: it runs `scripts/sync-posts.mjs` (and the other sync scripts), commits "chore: sync" and pushes, which deploys. To run it now: Tangled → saturn → Pipelines → the newest sync run → Retry. Afterwards, `git pull` before editing locally.5657What the sync does:5859- Copies my top-level posts and reposts into `/posts/`. Replies are skipped.60- Puts the newest post in a card on `/` and `/blog/`.6162How things show up:6364- Links, mentions and tags are clickable.65- Images show as a single image or a 2-across grid.66- My own videos play on the page (click to play): Safari streams Bluesky's HLS copy, other browsers play the file from my PDS. Someone else's video shows Bluesky's thumbnail and links there.67- A GIF from Bluesky's picker (Klipy) loops as a small MP4 from Bluesky's proxy (`k.gifs.bsky.app`), never from Klipy. With reduced motion it shows a still frame.68- A quote or repost shows the other person's post in a card.69- If the PDS returns zero posts while the site still has some, the script stops without changing anything. Run it with `-- --force` only if I really deleted everything.7071Linking to my site from a post: put the full `https://danieldaum.net/...` URL in the text. A post can have images or a link card, not both. With images attached, the link in the text is still clickable.7273Run it locally: `mise run sync-posts`.7475## 2. publishing a new blog post or now post48## 1. publishing a new blog post or now post76497750Work out the slug (`now/oct-2026`, `blog/some-title`) and the date first.785179521. `git pull`.80532. **Copy the template:** `internal/template.html` → `<section>/<slug>/index.html`. Replace everything in CAPS:8154 - `<title>`, `og:title` and `twitter:title`: `daniel daum - Post Title`.82 - `description`, `og:description` and `twitter:description`: one sentence, the same in all three (it's also the feed summary and the standard.site description).55 - `description`, `og:description` and `twitter:description`: one sentence, the same in all three (it's also the feed summary).8356 - `og:url`: the full URL.8457 - The kicker: `now` or `blog`.8558 - The title in `<h1>`.@@ -90,7 +63,7 @@ Work out the slug (`now/oct-2026`, `blog/some-title`) and the date first.9063 - paragraphs of 3–6 sentences9164 - media as `h4` labels over lists, one title per line9265 - end on a plain paragraph with no heading934. **Banner (optional):** see section 3.664. **Banner (optional):** see section 2.94675. **Pager:** the post's pager links to the previous post in date order across all writing (now posts and about mixed). Give the new post a `← previous` card pointing at the current newest post. Then add a `next →` card to that older post, and to `/now/index.html` if it's a copy of it. Remove any card with nothing to point to.95686. **`/blog/`:** add a row at the top of `ol.archive` in `blog/index.html`:9669 ```html@@ -121,13 +94,12 @@ Work out the slug (`now/oct-2026`, `blog/some-title`) and the date first.12194 - `title`, `link`, `id` (the full URL), `published` and `updated` as `2026-10-01T09:00:00-07:00`, `<category term="now" />`.12295 - `summary`: the meta description, word for word.12396 - `content type="html"` in CDATA: the post body. Banner first, as `<figure><img ... /></figure>`. Absolute URLs, no `class`/`aria-*`/`target`/`rel` attributes, one block per line, indented 6 spaces.1249. **Now posts only:** replace the article in `now/index.html` with the new post's article. Keep its likes section as `data-social="/now/<slug>/"` so likes and comments are shared with the dated page.979. **Now posts only:** replace the article in `now/index.html` with the new post's article.1259810. Check it locally, then show me the diff for me to commit and push.12611. After it's deployed, the next hourly sync publishes it to standard.site (see section 6) and adds a `<link rel="site.standard.document">` tag to the page. Retry the newest sync run to do it straight away.12799128100When an existing post changes, also update its word count on the home page and its `<content>` in `feed.xml`.129101130## 3. banners102## 2. banners131103132104A banner is an optional photo across the top of a post. It must already be on `/photos/` and have its own photo page, and the banner links to that page.133105@@ -163,9 +135,7 @@ How to choose: picture a horizontal strip half as tall as the photo is wide. A g163135164136No link here. Phones show only the middle photo, so put the best one in the middle.165137166**Sizes.** On the site, any size works. For standard.site the cover has to be under 1 MB. The sync script handles that itself: it uses a Cloudflare-resized copy (`/cdn-cgi/image/width=1600,quality=80,format=webp/...`) when the original is too big. Nothing to do.167168## 4. adding photos138## 3. adding photos169139170140For each photo I give you: file name, title, location, date, mood (film simulation, may be blank), and the camera (always the same unless I say otherwise).171141@@ -206,7 +176,7 @@ For each photo I give you: file name, title, location, date, mood (film simulati2061766. **Pager:** `← newer` and `older →` follow wall order, with no looping. The first photo has no newer card and the last has no older card. Update the photo pages next to the new ones.2071777. Check that every `#view-...` and `/photos/.../` link points at something that exists.208178209## 5. notes (reviews)179## 4. notes (reviews)210180211181Every game, movie, show, book and album has a page (`games/<slug>/` and so on) with a review section:212182@@ -229,44 +199,29 @@ Every game, movie, show, book and album has a page (`games/<slug>/` and so on) w229199230200 Example: `<a class="rating rating--great" href="/ratings/" aria-label="rated 5 out of 5, see my rating scale">(5/5)</a>`. Unrated: `class="rating"`, `(?/5)`, `aria-label="not yet rated, see my rating scale"`.231201- When a review is written, add it to the `/blog/` writing list like a post. Link it to the entry page and tag it `#game`, `#movie`, `#show`, `#book` or `#album`.232- Notes **never** go in `feed.xml`, and the standard.site sync skips those tags.202- Notes **never** go in `feed.xml`.233203- The ~130 empty entries are a backlog. Don't list them on `/blog/` until they have a review.234204235## 6. standard.site (atproto)236237My long-form posts are published as `site.standard.document` records on my PDS, so atproto reading apps can find and follow them. It's metadata only (title, description, path, date, tag and a cover image). The post itself stays on the site.238239- `scripts/sync-standard.mjs` runs as part of the hourly sync, and locally with `mise run sync-standard`. Locally it needs the app password:240 ```bash241 read -s -p "app password: " ATPROTO_APP_PASSWORD && echo && export ATPROTO_APP_PASSWORD && mise run sync-standard242 ```243- **What gets published:** every row of the `/blog/` writing list, except note tags.244- **Record IDs** come from the post's date, so changing a date creates a new record. The script never deletes records.245- **Only changed records are written,** so running it twice is harmless.246- **The publication record** has ID `3mbd3542k2222`. Its address is also in `.well-known/site.standard.publication`.247- **Secrets:** `ATPROTO_APP_PASSWORD` is a spindle secret (section 8). Without it, the standard.site step skips itself.248249## 7. projects205## 5. projects250206251207A project shows up in three places, newest first:2522082532091. **Home page:** a `.card` in the projects `.card-grid`, before the "all projects" card.2542. **`/projects/`:** a `.project-card`. The left side has the type line, name, description and pills. The right side has a screenshot (`.project-card-img`) or, before there is one, the commit log.2102. **`/projects/`:** a `.project-card`. The left side has the type line, name, description and pills. The right side has a screenshot (`.project-card-img`) or, before there is one, a commit log.2552113. **`projects/<name>/`:** copy `projects/saturn/` (with a screenshot) or `projects/holonet/` (with the commit log in the banner).256212257213**Pills.** `<div class="pills">` with `<span class="pill">#new</span>`. `#in-development` also carries `pill--dev`, a pulsing dot that is commented out in `global.css` for now. They're grey, never lime. Take them off when the project isn't new any more.258214259**Commit log.** `scripts/sync-commits.mjs` reads recent commits from the Tangled knot (`knot1.tangled.sh`, `sh.tangled.repo.log`, no login) and writes them between `<!-- commits:<repo>:<count> -->` markers. It runs with the hourly sync, or locally with `mise run sync-commits`. To add a repo, put the markers inside a `.commit-log` and add the page to `PAGES` in the script. On the `/projects/` card, the log is `aria-hidden` because the whole card is a link, and it hides the hash to save room.215**Commit log.** Written by hand: one `li.commit-log-row` per commit inside a `.commit-log`, with the short hash, the first line of the message and the date (`09 Sep 26`). On the `/projects/` card, the log is `aria-hidden` because the whole card is a link, and it hides the hash to save room.260216261## 8. ci (tangled spindle)217## 6. ci (tangled spindle)262218263Three workflows in `.tangled/workflows/`, run by the public spindle (`spindle.tangled.sh`). Status shows under Pipelines on the repo page.219Two workflows in `.tangled/workflows/`, run by the public spindle (`spindle.tangled.sh`). Status shows under Pipelines on the repo page.264220265221- **deploy.yml** (every push to `main`): stages the public files and runs `npx wrangler@4 pages deploy`.266222- **mirror.yml** (every push to `main`): force-pushes the newest `main` to GitHub (https + token) and Gitea (ssh to `git-ssh.danieldaum.net:2222`, which skips Cloudflare; https to `git.danieldaum.net` goes through Cloudflare's bot protection, which blocks spindle at random). Never push to those directly; it gets overwritten.267- **sync.yml** (hourly, plus Retry): checks out the newest `main`, runs the three sync scripts, and if anything changed commits "chore: sync" and pushes back over SSH, which runs deploy and mirror.268223269**Secrets** (Tangled → saturn → Settings → Pipelines): `CLOUDFLARE_API_TOKEN`, `CLOUDFLARE_ACCOUNT_ID`, `GH_MIRROR_TOKEN` (GitHub, contents write on this repo), `GITEA_MIRROR_KEY` (private half of the `spindle-mirror` SSH key on my Gitea account), `ATPROTO_APP_PASSWORD`, `TANGLED_PUSH_KEY` (private half of the `saturn-spindle` SSH key on my Tangled account).224**Secrets** (Tangled → saturn → Settings → Pipelines): `CLOUDFLARE_API_TOKEN`, `CLOUDFLARE_ACCOUNT_ID`, `GH_MIRROR_TOKEN` (GitHub, contents write on this repo) and `GITEA_MIRROR_KEY` (private half of the `spindle-mirror` SSH key on my Gitea account).270225271226**Gotchas** (nixery engine):272227@@ -275,15 +230,13 @@ Three workflows in `.tangled/workflows/`, run by the public spindle (`spindle.ta275230- Images only have bash, git, coreutils, tar and zstd. Anything else (`gnugrep`, `findutils`, `nodejs`, `openssh`) goes under `dependencies: nixpkgs:`.276231- Big nixpkgs packages can time out on nixery with a 504 (`wrangler` did). Prefer `npx` for those.277232- The checkout is one commit deep (`clone.depth: 0` also means 1). `git fetch --unshallow origin` for full history.278- There's no `/etc/passwd`, which `ssh` needs. sync.yml writes one before pushing.279- A push from a pipeline triggers the push workflows. `git push -o skip-ci` skips them; `[skip ci]` in a message doesn't.233- There's no `/etc/passwd`, which `ssh` needs. mirror.yml writes one before pushing.280234281## 9. don't235## 7. don't282236283- Don't add JavaScript, inline styles or new external hosts to public pages without asking.284- Don't hand-edit content between `<!-- posts:... -->` or `<!-- commits:... -->` markers.237- Don't add JavaScript, inline styles, new external hosts or anything that needs a server to public pages without asking.285238- Don't use `#view-...` links outside `/photos/`. Posts and banners link to `/photos/<name>/`.286- Don't commit `.claude/launch.json`, `.dev.vars` or anything with a password in it.239- Don't commit `.claude/launch.json` or anything with a password in it.287240- Don't re-add `@view-transition` (it caused unstyled loads in Safari).288241- Don't push to GitHub or Gitea. They're mirrors of Tangled.289242- Don't commit or push. Show me the changes instead.
internal/social/index.htmldeleted
+0 −342
@@ -1,342 +0,0 @@1<!doctype html>2<html lang="en">34<head>5 <meta charset="UTF-8" />6 <meta name="viewport" content="width=device-width, initial-scale=1.0" />7 <meta name="description" content="daniel daum's now page - oakland based software engineer" />8 <meta http-equiv="Content-Security-Policy"9 content="default-src 'self'; style-src 'self' 'unsafe-inline'; font-src 'self'; img-src 'self' https://assets.danieldaum.net; media-src 'self' https://assets.danieldaum.net;" />10 <meta name="referrer" content="strict-origin-when-cross-origin" />11 <link rel="preload" href="/assets/fonts/ioskeleymono/IoskeleyMono-Regular.woff2" as="font" type="font/woff2" crossorigin />12 <link rel="preload" href="/assets/fonts/ioskeleymono/IoskeleyMono-Bold.woff2" as="font" type="font/woff2" crossorigin />13 <link rel="preload" href="/assets/fonts/ioskeleymono/IoskeleyMono-SemiBold.woff2" as="font" type="font/woff2" crossorigin />14 <link rel="preconnect" href="https://assets.danieldaum.net" />15 <link rel="stylesheet" href="/global.css" />16 <link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon/favicon-32x32.png" />17 <link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon/favicon-16x16.png" />18 <link rel="apple-touch-icon" sizes="180x180" href="/assets/favicon/apple-touch-icon.png" />19 <link rel="manifest" href="/assets/favicon/site.webmanifest" />20 <link rel="alternate" type="application/atom+xml" title="daniel daum" href="https://danieldaum.net/feed.xml" />21 <meta name="robots" content="noindex" />22 <title>daniel daum - now</title>2324 <meta property="og:type" content="website" />25 <meta property="og:site_name" content="daniel daum" />26 <meta property="og:title" content="daniel daum - now" />27 <meta property="og:description" content="daniel daum's now page - oakland based software engineer" />28 <meta property="og:url" content="https://danieldaum.net/now/sep-2026/" />29 <meta property="og:image" content="https://assets.danieldaum.net/img/misc/og.jpg" />30 <meta property="og:image:type" content="image/jpeg" />31 <meta property="og:image:width" content="1200" />32 <meta property="og:image:height" content="630" />33 <meta property="og:image:alt" content="daniel daum - software engineer, avid reader, aspiring game dev - danieldaum.net" />3435 <meta name="twitter:card" content="summary_large_image" />36 <meta name="twitter:title" content="daniel daum - now" />37 <meta name="twitter:description" content="daniel daum's now page - oakland based software engineer" />38 <meta name="twitter:image" content="https://assets.danieldaum.net/img/misc/og.jpg" />39 <meta name="twitter:image:alt" content="daniel daum - software engineer, avid reader, aspiring game dev - danieldaum.net" />40 <style>41 /* mock only: likes + comments inside the post panel */42 .post-social {43 margin-top: 3rem;44 padding-top: 1.25rem;45 border-top: 1px dashed var(--borders);46 }474849 .social-head {50 display: flex;51 justify-content: space-between;52 align-items: center;53 gap: 1rem;54 margin-bottom: 0.5rem;55 }5657 .social-title {58 margin: 0;59 font-size: 0.78rem;60 font-weight: 600;61 letter-spacing: 0.12em;62 text-transform: uppercase;63 color: var(--accent);64 }6566 .reply-thread {67 list-style: none;68 margin: 0;69 padding: 0;70 }7172 .reply-thread li {73 margin: 0;74 }7576 .reply-thread .reply-thread {77 margin-top: 0.25rem;78 padding-left: 1rem;79 border-left: 1px solid var(--borders);80 }8182 .reply {83 padding: 1rem 0;84 }8586 .reply-thread > li + li > .reply {87 border-top: 1px solid var(--borders);88 }8990 .reply .meta {91 display: flex;92 flex-wrap: wrap;93 gap: 0.25rem 0.75rem;94 margin: 0 0 0.5rem;95 font-size: 0.78rem;96 letter-spacing: 0.04em;97 }9899 .reply-name {100 color: var(--text-headings);101 font-weight: 600;102 }103104 .reply-author {105 padding: 0 0.35rem;106 border: 1px solid var(--borders);107 font-size: 0.7rem;108 letter-spacing: 0.08em;109 text-transform: uppercase;110 color: var(--accent);111 }112113 .reply-time {114 color: var(--text-secondary);115 text-transform: uppercase;116 }117118 .reply-body {119 margin: 0 0 0.5rem;120 }121122 .reply-link {123 font-size: 0.75rem;124 letter-spacing: 0.08em;125 text-transform: uppercase;126 }127128 .social-foot {129 display: flex;130 flex-wrap: wrap;131 justify-content: space-between;132 align-items: baseline;133 gap: 0.5rem 1rem;134 margin-top: 0.75rem;135 padding-top: 1rem;136 border-top: 1px solid var(--borders);137 }138139 .social-foot .meta {140 margin: 0;141 font-size: 0.75rem;142 }143 </style>144</head>145146<body>147 <a class="skip-link" href="#main">skip to content</a>148149 <!-- ===== HEADER ===== -->150 <header class="site-header">151 <a class="site-name" href="/">Daniel Daum</a>152 <nav aria-label="main navigation">153 <a href="/">home</a>154 <a href="/about/">about</a>155 <a href="/now/">now</a>156 <a href="/blog/">blog</a>157 <a href="/projects/">projects</a>158 <a href="/garden/">garden</a>159 </nav>160 </header>161162 <!-- ===== MAIN ===== -->163 <main id="main">164 <article>165 <header class="page-header page-header--post">166 <p class="page-header-kicker"><span aria-hidden="true">/</span>blog</p>167 <h1>Wake Me Up When September Ends</h1>168 <p class="meta caps"><time datetime="2026-09-03">3 September 2026</time></p>169 </header>170171 <section>172173 <blockquote>174 This page highlights what I've been doing recently. It updates on occasion, so check back every now and175 then, if you'd like. This is the september 2026 edition, 8 months on from my first update in <a176 href="/now/jan-2026/">January</a>. The most current update can be found <a href="/now/">here</a>.177178 </blockquote>179180181 <h3>College</h3>182 <p>183 This year, I finished the spring and summer semesters at Laney, a community college in Oakland, and I’m184 starting the fall semester. I’m taking Discrete Mathematics, Data Structures and Algorithms, and a185 history class—nothing too exciting. What’s exciting is that next spring will be my final semester at186 community college before I transfer! I’m currently applying to transfer to a four-year university. My187 hope is to transfer to UC Santa Cruz for a B.S. in Computer Science. It’s also internship application188 season, so I’m hoping to pick up a summer software engineering internship next summer (if you know of189 any, please reach out!).190 </p>191192 <h3>Coffee</h3>193 <p>194 I recently started getting into coffee. I’ve been making espresso at home and got addicted. I didn’t195 understand the coffee cult until recently, but drinking a warm espresso while reading the morning news196 on the balcony brings me so much joy each morning. I found a local coffee shop nearby called <a197 href="https://mothertongue.coffee">Mother Tongue</a>. They have great beans, and it’s women-owned!198 </p>199 <h3>Running</h3>200 <p>201 I decided, for some reason, that I wanted to run a half marathon, so I’ve started training for it. yay.202 </p>203204 <h3>Gaming</h3>205 <p>206 I’ve had less time for gaming lately. I recently finished the 2D platformer <a207 href="https://playreplaced.com">REPLACED</a> <a class="rating rating--good" href="/ratings/"208 aria-label="rated 3 out of 5, see my rating scale">(3/5)</a>. It’s209 absolutely gorgeous and perfect for the Steam Deck. I was originally planning to play <a210 href="https://www.alanwake.com">Alan Wake 2</a>, but211 I’ve decided to wait for Spooky Season to really dive into it! If I have time I hope to also finally get212 to the <a href="https://store.steampowered.com/app/1693980/Dead_Space/">Dead Space</a> Remake.213 </p>214215 <h3>Reading</h3>216 <p>217 I wish I had more positive notes here. I recently finished <a218 href="https://www.goodreads.com/book/show/10374.Hard_boiled_Wonderland_and_the_End_of_the_World">Hard-Boiled219 Wonderland and the End220 of the221 World</a> <a class="rating rating--below-average" href="/ratings/"222 aria-label="rated 2 out of 5, see my rating scale">(2/5)</a> by Haruki Murakami, <a223 href="https://www.goodreads.com/en/book/show/48037.Carmilla">Carmilla</a> <a224 class="rating rating--below-average" href="/ratings/"225 aria-label="rated 2 out of 5, see my rating scale">(2/5)</a> by226 Sheridan Le Fanu, and <a227 href="https://www.goodreads.com/en/book/show/50659468-a-court-of-mist-and-fury">A Court of Mist and228 Fury</a> <a class="rating rating--below-average" href="/ratings/"229 aria-label="rated 2 out of 5, see my rating scale">(2/5)</a>230 by231 Sarah J. Maas. Nothing great to report here, so232 on to the next one -> <a233 href="https://www.goodreads.com/book/show/211721806-dungeon-crawler-carl">Dungeon Crawler Carl</a>234 </p>235 <h3>Listening</h3>236 <p>237 <a href="https://music.apple.com/us/album/wor%24t-girl-in-america/1867530577">WOR$T GIRL IN AMERICA</a>238 <a class="rating rating--great" href="/ratings/"239 aria-label="rated 5 out of 5, see my rating scale">(5/5)</a>240 (Pop) from Slayyyter is amazing and perfect. It feels241 like this album was made specifically for242 me, and I’m so excited to see her live in concert soon!243 </p>244 <p>245 I’m also enjoying <a href="https://music.apple.com/us/album/navy-blue-ep/1845170440">Navy Blue</a> <a246 class="rating rating--above-average" href="/ratings/"247 aria-label="rated 4 out of 5, see my rating scale">(4/5)</a>248 (alternative) by Porch Light, who will be releasing a new249 album, <em>Hush</em>, later this month.250 </p>251252 <h3>Watching</h3>253 <p>254 If you’re into comedy or horror, I can’t recommend <a255 href="https://tv.apple.com/us/show/widows-bay/umc.cmc.1zzly0vah46bnvnwf0qkrjhh2">Widows256 Bay</a> <a class="rating rating--great" href="/ratings/"257 aria-label="rated 5 out of 5, see my rating scale">(5/5)</a> enough. It’s fantastic.258 </p>259260 <h3>This site</h3>261 <p>262 I finally decided to put more effort into this site, so expect to see more frequent updates and changes263 in the near future! Come back soon264 </p>265 </section>266267 <section class="post-social" id="comments" aria-label="comments">268 <div class="social-head">269 <h2 class="social-title">3 comments</h2>270 <form class="like-form" id="likes">271 <button type="button" class="like-button" aria-label="like this post, 12 likes"><svg class="like-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" /></svg> 12</button>272 </form>273 </div>274275 <ol class="reply-thread">276 <li>277 <article class="reply" id="reply-1">278 <p class="meta">279 <span class="reply-name">sam</span>280 <a class="reply-time" href="#reply-1"><time datetime="2026-09-04T09:12:00-07:00">4 Sep 2026 · 09:12</time></a>281 </p>282 <p class="reply-body">Good luck with the UCSC application! Mother Tongue is great, the cortado is worth the walk.</p>283 <a class="reply-link" href="mailto:reply@replies.danieldaum.net?subject=re:%20https://danieldaum.net/blog/wake-me-up-when-september-ends/%23reply-1">reply →</a>284285 <ol class="reply-thread">286 <li>287 <article class="reply" id="reply-2">288 <p class="meta">289 <span class="reply-name">daniel</span>290 <span class="reply-author">author</span>291 <a class="reply-time" href="#reply-2"><time datetime="2026-09-04T18:40:00-07:00">4 Sep 2026 · 18:40</time></a>292 </p>293 <p class="reply-body">Thank you! Adding the cortado to the list.</p>294 <a class="reply-link" href="mailto:reply@replies.danieldaum.net?subject=re:%20https://danieldaum.net/blog/wake-me-up-when-september-ends/%23reply-2">reply →</a>295 </article>296 </li>297 </ol>298 </article>299 </li>300 <li>301 <article class="reply" id="reply-3">302 <p class="meta">303 <span class="reply-name">alex</span>304 <a class="reply-time" href="#reply-3"><time datetime="2026-09-06T21:03:00-07:00">6 Sep 2026 · 21:03</time></a>305 </p>306 <p class="reply-body">Hard agree on Hard-Boiled Wonderland. Half of it is incredible and the other half I still don't understand.</p>307 <a class="reply-link" href="mailto:reply@replies.danieldaum.net?subject=re:%20https://danieldaum.net/blog/wake-me-up-when-september-ends/%23reply-3">reply →</a>308 </article>309 </li>310 </ol>311312 <div class="social-foot">313 <a class="reply-link" href="mailto:reply@replies.danieldaum.net?subject=re:%20https://danieldaum.net/blog/wake-me-up-when-september-ends/">reply by email →</a>314 <p class="meta">replies arrive by email; your address is never shown or stored</p>315 </div>316 </section>317 </article>318319 <nav class="pager" aria-label="post navigation">320 <a class="pager-link pager-prev" href="/about/" rel="prev">321 <span class="pager-label">← previous</span>322 <span class="pager-title">Let Me Introduce Myself</span>323 </a>324 </nav>325 </main>326327 <!-- ===== FOOTER ===== -->328 <footer>329 <nav aria-label="site links">330 <p aria-hidden="true">//</p>331 <a href="mailto:daniel@danieldaum.net">email</a>332 <a href="https://tangled.org/danieldaum.net" aria-label="git (opens in new tab)" target="_blank"333 rel="noopener noreferrer">git</a>334 <a href="/pgp.asc" aria-label="PGP public key (516E97FF)">PGP</a>335 <a href="/changelog/">changelog</a>336 <a href="/privacy/">privacy</a>337 <a href="/feed.xml">feed</a>338 </nav>339 </footer>340</body>341342</html>
internal/styles.html
+4 −145
@@ -7,7 +7,7 @@77 <meta name="viewport" content="width=device-width, initial-scale=1.0" />88 <meta name="robots" content="noindex" />99 <meta http-equiv="Content-Security-Policy"10 content="default-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'unsafe-inline'; font-src 'self'; img-src 'self' https://assets.danieldaum.net https://pds.danieldaum.net; media-src https://k.gifs.bsky.app;" />10 content="default-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'unsafe-inline'; font-src 'self'; img-src 'self' https://assets.danieldaum.net;" />1111 <link rel="preload" href="/assets/fonts/ioskeleymono/IoskeleyMono-Regular.woff2" as="font" type="font/woff2" crossorigin />1212 <link rel="preload" href="/assets/fonts/ioskeleymono/IoskeleyMono-Bold.woff2" as="font" type="font/woff2" crossorigin />1313 <link rel="preload" href="/assets/fonts/ioskeleymono/IoskeleyMono-SemiBold.woff2" as="font" type="font/woff2" crossorigin />@@ -137,7 +137,6 @@137137 <li><a href="#type">type</a></li>138138 <li><a href="#text">text</a></li>139139 <li><a href="#post">post</a></li>140 <li><a href="#posts">posts</a></li>141140 <li><a href="#wayfinding">wayfinding</a></li>142141 <li><a href="#listings">listings</a></li>143142 <li><a href="#projects">projects</a></li>@@ -394,15 +393,14 @@394393 <section class="guide-section" id="post" aria-label="post">395394 <h2>post</h2>396395 <p>A post is an <code>article</code> holding a <code>.page-header--post</code>, which turns it into the397 panel. The likes and comments block is written by functions/_middleware.js; the markup below copies398 what it outputs. A <code>.pager</code> straight after the article sits 1rem under it. An optional396 panel. A <code>.pager</code> straight after the article sits 1rem under it. An optional399397 <code>.post-banner</code> photo can open the panel: 2:1 (4:3 on phones), bled to the panel edges,400398 linking to the photo's page. <code>.post-banner--row</code> (a <code>figure</code>, no link) holds401399 several photos side by side, as on /about/. On phones the402400 panel and pager cards run edge to edge.</p>403401404402 <div class="demo">405 <p class="demo-label">article / .page-header--post / .post-social / .pager</p>403 <p class="demo-label">article / .page-header--post / .pager</p>406404 <article>407405 <header class="page-header page-header--post">408406 <p class="page-header-kicker"><span aria-hidden="true">/</span>now</p>@@ -415,47 +413,6 @@415413 <p>I recently started getting into coffee. I found a local coffee shop nearby called416414 <a href="#post">Mother Tongue</a>.</p>417415 </section>418419 <section class="post-social" aria-label="likes and comments">420 <div class="social-head">421 <h2 class="social-title">2 comments</h2>422 <form class="like-form">423 <button type="button" class="like-button" aria-label="like this post, 3 likes"><svg class="like-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" /></svg> 3</button>424 </form>425 </div>426 <ol class="comment-thread">427 <li>428 <article class="comment" id="demo-comment-1">429 <p class="meta">430 <span class="comment-name">sam</span>431 <a class="comment-time" href="#demo-comment-1"><time datetime="2026-09-04T16:12:00Z">4 Sept 2026 · 09:12</time></a>432 </p>433 <div class="comment-body">434 <p>Mother Tongue is great. Try the cortado.</p>435 </div>436 <a class="comment-link" href="#post">reply →</a>437 <ol class="comment-thread">438 <li>439 <article class="comment" id="demo-comment-2">440 <p class="meta">441 <span class="comment-name">daniel</span><span class="comment-author">author</span>442 <a class="comment-time" href="#demo-comment-2"><time datetime="2026-09-04T18:30:00Z">4 Sept 2026 · 11:30</time></a>443 </p>444 <div class="comment-body">445 <p>Will do!</p>446 </div>447 <a class="comment-link" href="#post">reply →</a>448 </article>449 </li>450 </ol>451 </article>452 </li>453 </ol>454 <div class="social-foot">455 <a class="comment-link" href="#post">comment by email →</a>456 <p class="meta">Start with a "name:" line for your display name. Your email is never shown or stored</p>457 </div>458 </section>459416 </article>460417461418 <nav class="pager" aria-label="post navigation demo">@@ -484,106 +441,8 @@484441 </article>485442 </div>486443487 <div class="demo">488 <p class="demo-label">.post-social, empty and already liked</p>489 <section class="post-social" aria-label="likes and comments, empty">490 <div class="social-head">491 <h2 class="social-title">no comments yet</h2>492 <form class="like-form">493 <button type="button" class="like-button" aria-label="you liked this post, 1 like" disabled aria-pressed="true"><svg class="like-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" /></svg> 1</button>494 </form>495 </div>496 <div class="social-foot">497 <a class="comment-link" href="#post">comment by email →</a>498 <p class="meta">Start with a "name:" line for your display name. Your email is never shown or stored</p>499 </div>500 </section>501 </div>502444 </section>503445504 <!-- ===================== -->505 <!-- POSTS -->506 <!-- ===================== -->507 <section class="guide-section" id="posts" aria-label="posts">508 <h2>posts</h2>509510 <div class="demo">511 <p class="demo-label">.post-item: written by scripts/sync-posts.mjs between <!-- posts:all --> markers, never by hand</p>512 <article class="post-item" id="demo-post">513 <p class="post-item-meta">514 <a class="post-item-time" href="#demo-post"><time datetime="2026-10-08T21:01:00Z">8 Oct 2026, 2:01 pm</time></a>515 <a class="post-item-reply" href="#posts">reply on bluesky</a>516 </p>517 <p class="post-item-body">a short post with a <a href="#posts">link</a>, a <a href="#posts">#tag</a> and a <a href="#posts">@mention</a>.<br />line breaks are kept.</p>518 <a class="post-item-card" href="#posts">519 <span class="post-item-card-title">daniel daum - blog</span>520 <span class="post-item-card-desc">daniel daum's blog — everything i write, in one place</span>521 <span class="post-item-card-meta">danieldaum.net</span>522 </a>523 </article>524 </div>525526 <div class="demo">527 <p class="demo-label">.post-card: the newest post on / and /blog/, via <!-- posts:highlight -->, then .post-feed-more</p>528 <a class="post-card" href="#posts">529 <span class="post-card-meta">530 <span>@danieldaum.net</span>531 <time datetime="2026-10-08T21:24:00Z">8 Oct 2026, 2:24 pm</time>532 </span>533 <span class="post-card-text">the post's own text, sentence case, four lines at most.</span>534 <span class="post-card-extra">2 images</span>535 </a>536 <p class="post-feed-more caps"><a href="#posts">all posts →</a></p>537 </div>538539 <div class="demo">540 <p class="demo-label">.post-item-media (one image keeps its shape) / .post-item-media--grid (two or more, square crops)</p>541 <article class="post-item">542 <div class="post-item-media post-item-media--grid">543 <img src="https://assets.danieldaum.net/img/photos/regatta-lineup.webp" alt="rowing boats lined up for a regatta" loading="lazy" />544 <img src="https://assets.danieldaum.net/img/photos/lake-tahoe-boat.webp" alt="boat on lake tahoe" loading="lazy" />545 </div>546 </article>547 </div>548549 <div class="demo">550 <p class="demo-label">.post-item-gif: a klipy gif as a looping mp4, the still img instead with reduced motion. my own videos are a video.post-item-player (controls, preload="none")</p>551 <article class="post-item">552 <div class="post-item-gif">553 <video src="https://k.gifs.bsky.app/ii/a8ada81afc59159ea5c8927feffa2e31/90/ef/AZuKvFIedRnN1u55A.mp4" poster="https://pds.danieldaum.net/xrpc/com.atproto.sync.getBlob?did=did%3Aplc%3Ae3z5gj5iyuwgqao562bo4bdf&cid=bafkreiftva4sy2afsdwdu4mxa7obheflx5hx73ttavojrnyr7mv5kpqnru" width="251" height="429" role="img" aria-label="Gabby Williams celebrating" autoplay loop muted playsinline></video>554 <img src="https://pds.danieldaum.net/xrpc/com.atproto.sync.getBlob?did=did%3Aplc%3Ae3z5gj5iyuwgqao562bo4bdf&cid=bafkreiftva4sy2afsdwdu4mxa7obheflx5hx73ttavojrnyr7mv5kpqnru" alt="Gabby Williams celebrating" width="251" height="429" loading="lazy" />555 </div>556 </article>557 </div>558559 <div class="demo">560 <p class="demo-label">.post-item--repost: .post-item-label in the meta row, the original post in .post-item-repost</p>561 <article class="post-item post-item--repost">562 <p class="post-item-meta">563 <span><span class="post-item-label">reposted</span> <a class="post-item-time" href="#posts"><time datetime="2026-10-08T21:30:00Z">8 Oct 2026, 2:30 pm</time></a></span>564 <a class="post-item-reply" href="#posts">reply on bluesky</a>565 </p>566 <div class="post-item-repost">567 <p class="post-item-card-meta">someone <span>@someone.example</span></p>568 <p class="post-item-body">someone else's post, with its <a href="#posts">links</a> and media.</p>569 </div>570 </article>571 </div>572573 <div class="demo">574 <p class="demo-label">.post-item-quote, .post-item-video (bluesky's thumbnail, links out), .post-item-note (fallback when the appview lookup fails)</p>575 <article class="post-item">576 <a class="post-item-card post-item-quote" href="#posts">577 <span class="post-item-card-meta">someone <span>@someone.example</span></span>578 <span class="post-item-quote-text">the quoted post's text, clamped to four lines.</span>579 </a>580 <a class="post-item-video" href="#posts">581 <img src="https://assets.danieldaum.net/img/photos/wildcat-beach.webp" alt="video, plays on bluesky" width="400" height="400" loading="lazy" />582 </a>583 <p class="post-item-note"><a href="#posts">quoting →</a></p>584 </article>585 </div>586 </section>587446588447 <!-- ===================== -->589448 <!-- WAYFINDING -->@@ -772,7 +631,7 @@772631 </div>773632774633 <div class="demo">775 <p class="demo-label">.commit-log, written by scripts/sync-commits.mjs (banner or /projects/ card)</p>634 <p class="demo-label">.commit-log, written by hand (banner or /projects/ card)</p>776635 <div class="commit-log">777636 <div class="commit-log-head">778637 <span>recent commits</span>
internal/template.html
+0 −5
@@ -81,11 +81,6 @@8181 Body text.8282 </p>8383 </section>8485 <!-- likes and comments are filled in by functions/_middleware.js -->86 <section class="post-social" id="comments" data-social aria-label="likes and comments">87 <p class="meta">likes and comments unavailable</p>88 </section>8984 </article>90859186 <!-- remove whichever card has no post yet -->
mise.toml
+0 −15
@@ -7,21 +7,6 @@ node = "latest"77description = "Run the site in live-reload mode"88run = "five-server --port=8080"9910# mise run sync-posts11[tasks.sync-posts]12description = "Copy my bluesky posts from my pds into the html"13run = "node scripts/sync-posts.mjs"1415# ATPROTO_APP_PASSWORD=... mise run sync-standard16[tasks.sync-standard]17description = "Publish my writing to standard.site"18run = "node scripts/sync-standard.mjs"1920# mise run sync-commits21[tasks.sync-commits]22description = "Copy recent commits from tangled into the project pages"23run = "node scripts/sync-commits.mjs"242510# mise run words now/sep-2026/index.html2611[tasks.words]2712description = "Word count for a post, for the home page"
now/index.html
+0 −9
@@ -314,15 +314,6 @@314314 near future! Come back soon315315 </p>316316 </section>317318 <section319 class="post-social"320 id="comments"321 data-social="/now/sep-2026/"322 aria-label="likes and comments"323 >324 <p class="meta">likes and comments unavailable</p>325 </section>326317 </article>327318328319 <nav class="pager" aria-label="post navigation">
now/jan-2026/index.html
+0 −5
@@ -36,7 +36,6 @@3636 <meta name="twitter:description" content="daniel daum's now page - oakland based software engineer" />3737 <meta name="twitter:image" content="https://assets.danieldaum.net/img/misc/og.jpg" />3838 <meta name="twitter:image:alt" content="daniel daum - software engineer, avid reader, aspiring game dev - danieldaum.net" />39 <link rel="site.standard.document" href="at://did:plc:e3z5gj5iyuwgqao562bo4bdf/site.standard.document/3mcwmoxyw224h" />4039</head>41404241<body>@@ -181,10 +180,6 @@181180182181 <p>So here's to 2026</p>183182 </section>184185 <section class="post-social" id="comments" data-social aria-label="likes and comments">186 <p class="meta">likes and comments unavailable</p>187 </section>188183 </article>189184190185 <nav class="pager" aria-label="post navigation">
now/sep-2026/index.html
+0 −5
@@ -36,7 +36,6 @@3636 <meta name="twitter:description" content="daniel daum's now page - oakland based software engineer" />3737 <meta name="twitter:image" content="https://assets.danieldaum.net/img/misc/og.jpg" />3838 <meta name="twitter:image:alt" content="daniel daum - software engineer, avid reader, aspiring game dev - danieldaum.net" />39 <link rel="site.standard.document" href="at://did:plc:e3z5gj5iyuwgqao562bo4bdf/site.standard.document/3mumfm4po22sr" />4039</head>41404241<body>@@ -164,10 +163,6 @@164163 in the near future! Come back soon165164 </p>166165 </section>167168 <section class="post-social" id="comments" data-social aria-label="likes and comments">169 <p class="meta">likes and comments unavailable</p>170 </section>171166 </article>172167173168 <nav class="pager" aria-label="post navigation">
posts/index.htmldeleted
+0 −203
@@ -1,203 +0,0 @@1<!doctype html>2<html lang="en">3 <head>4 <meta charset="UTF-8" />5 <meta name="viewport" content="width=device-width, initial-scale=1.0" />6 <meta7 name="description"8 content="daniel daum's posts — short thoughts, synced from bluesky"9 />10 <meta11 http-equiv="Content-Security-Policy"12 content="default-src 'self'; style-src 'self'; font-src 'self'; img-src 'self' https://assets.danieldaum.net https://pds.danieldaum.net https://cdn.bsky.app https://video.bsky.app https://video.cdn.bsky.app; media-src 'self' https://assets.danieldaum.net https://pds.danieldaum.net https://k.gifs.bsky.app https://video.bsky.app https://video.cdn.bsky.app;"13 />14 <meta name="referrer" content="strict-origin-when-cross-origin" />15 <link16 rel="preload"17 href="/assets/fonts/ioskeleymono/IoskeleyMono-Regular.woff2"18 as="font"19 type="font/woff2"20 crossorigin21 />22 <link23 rel="preload"24 href="/assets/fonts/ioskeleymono/IoskeleyMono-Bold.woff2"25 as="font"26 type="font/woff2"27 crossorigin28 />29 <link30 rel="preload"31 href="/assets/fonts/ioskeleymono/IoskeleyMono-SemiBold.woff2"32 as="font"33 type="font/woff2"34 crossorigin35 />36 <link rel="preconnect" href="https://assets.danieldaum.net" />37 <link rel="stylesheet" href="/global.css" />38 <link39 rel="icon"40 type="image/png"41 sizes="32x32"42 href="/assets/favicon/favicon-32x32.png"43 />44 <link45 rel="icon"46 type="image/png"47 sizes="16x16"48 href="/assets/favicon/favicon-16x16.png"49 />50 <link51 rel="apple-touch-icon"52 sizes="180x180"53 href="/assets/favicon/apple-touch-icon.png"54 />55 <link rel="manifest" href="/assets/favicon/site.webmanifest" />56 <link57 rel="alternate"58 type="application/atom+xml"59 title="daniel daum"60 href="https://danieldaum.net/feed.xml"61 />62 <title>daniel daum - posts</title>6364 <meta property="og:type" content="website" />65 <meta property="og:site_name" content="daniel daum" />66 <meta property="og:title" content="daniel daum - posts" />67 <meta68 property="og:description"69 content="daniel daum's posts — short thoughts, synced from bluesky"70 />71 <meta property="og:url" content="https://danieldaum.net/posts/" />72 <meta73 property="og:image"74 content="https://assets.danieldaum.net/img/misc/og.jpg"75 />76 <meta property="og:image:type" content="image/jpeg" />77 <meta property="og:image:width" content="1200" />78 <meta property="og:image:height" content="630" />79 <meta80 property="og:image:alt"81 content="daniel daum - software engineer, avid reader, aspiring game dev - danieldaum.net"82 />8384 <meta name="twitter:card" content="summary_large_image" />85 <meta name="twitter:title" content="daniel daum - posts" />86 <meta87 name="twitter:description"88 content="daniel daum's posts — short thoughts, synced from bluesky"89 />90 <meta91 name="twitter:image"92 content="https://assets.danieldaum.net/img/misc/og.jpg"93 />94 <meta95 name="twitter:image:alt"96 content="daniel daum - software engineer, avid reader, aspiring game dev - danieldaum.net"97 />98 </head>99100 <body>101 <a class="skip-link" href="#main">skip to content</a>102103 <!-- ===== HEADER ===== -->104 <header class="site-header">105 <a class="site-name" href="/">Daniel Daum</a>106 <nav aria-label="main navigation">107 <a href="/">home</a>108 <a href="/about/">about</a>109 <a href="/now/">now</a>110 <a href="/blog/">blog</a>111 <a href="/projects/">projects</a>112 <a href="/garden/">garden</a>113 </nav>114 </header>115116 <!-- ===== MAIN ===== -->117 <main id="main">118 <nav class="breadcrumb" aria-label="breadcrumb">119 <a href="/blog/">blog</a> <span aria-hidden="true">-></span>120 <a href="/posts/">posts</a>121 </nav>122123 <header class="page-header">124 <h1><span aria-hidden="true">/</span>posts</h1>125 <p class="meta">126 Short posts. Written on127 <a href="https://bsky.app/profile/danieldaum.net">bluesky</a>128 and synced here.129 </p>130 </header>131132 <!-- filled by scripts/sync-posts.mjs (mise run sync-posts) -->133 <section class="post-feed" aria-label="posts">134 <!-- posts:all -->135 <article class="post-item" id="3mxinhl6tzk22">136 <p class="post-item-meta">137 <a class="post-item-time" href="/posts/#3mxinhl6tzk22"><time datetime="2026-10-10T04:25:33.268Z">9 Oct 2026, 9:25 pm</time></a>138 <a class="post-item-reply" href="https://bsky.app/profile/danieldaum.net/post/3mxinhl6tzk22">reply on bluesky</a>139 </p>140 <div class="post-item-gif">141 <video src="https://k.gifs.bsky.app/ii/a8ada81afc59159ea5c8927feffa2e31/90/ef/AZuKvFIedRnN1u55A.mp4" poster="https://pds.danieldaum.net/xrpc/com.atproto.sync.getBlob?did=did%3Aplc%3Ae3z5gj5iyuwgqao562bo4bdf&cid=bafkreiftva4sy2afsdwdu4mxa7obheflx5hx73ttavojrnyr7mv5kpqnru" width="251" height="429" role="img" aria-label="Gabby Williams celebrating" autoplay loop muted playsinline></video>142 <img src="https://pds.danieldaum.net/xrpc/com.atproto.sync.getBlob?did=did%3Aplc%3Ae3z5gj5iyuwgqao562bo4bdf&cid=bafkreiftva4sy2afsdwdu4mxa7obheflx5hx73ttavojrnyr7mv5kpqnru" alt="Gabby Williams celebrating" width="251" height="429" loading="lazy" />143 </div>144 </article>145146 <article class="post-item" id="3mxfkzwpoks2p">147 <p class="post-item-meta">148 <a class="post-item-time" href="/posts/#3mxfkzwpoks2p"><time datetime="2026-10-08T23:04:08.894Z">8 Oct 2026, 4:04 pm</time></a>149 <a class="post-item-reply" href="https://bsky.app/profile/danieldaum.net/post/3mxfkzwpoks2p">reply on bluesky</a>150 </p>151 <p class="post-item-body">just added new photos to my site! a race in santa cruz and a few concerts 📷<br /><br /><a href="https://danieldaum.net/photos/">danieldaum.net/photos/</a></p>152 <div class="post-item-media post-item-media--grid">153 <img src="https://pds.danieldaum.net/xrpc/com.atproto.sync.getBlob?did=did%3Aplc%3Ae3z5gj5iyuwgqao562bo4bdf&cid=bafkreigbjutgwije6vwkdf2fzrnsucykrr52ojzkrsej3mfcbwwqq63t5u" alt="A blurry long expose selfie of myself sitting at the Greek theater pavilion with the blue sky above me" width="2995" height="4000" loading="lazy" />154 <img src="https://pds.danieldaum.net/xrpc/com.atproto.sync.getBlob?did=did%3Aplc%3Ae3z5gj5iyuwgqao562bo4bdf&cid=bafkreia3xxoqu4xbjoo6oa2scxuioeuuk734premwz5gl3a6crkppoqtaq" alt="A group of people running on a trail in a single file line, with bushes on the left and grass on the right" width="3000" height="3999" loading="lazy" />155 <img src="https://pds.danieldaum.net/xrpc/com.atproto.sync.getBlob?did=did%3Aplc%3Ae3z5gj5iyuwgqao562bo4bdf&cid=bafkreigg4u6parvt5o3fbn2g2qvv4iq3vawk6dywss2thl4o6ny2smcpr4" alt="A band opening for a concert at the Greek theater, a crowd below lit in red lights and the band lit in green lights" width="2995" height="4000" loading="lazy" />156 <img src="https://pds.danieldaum.net/xrpc/com.atproto.sync.getBlob?did=did%3Aplc%3Ae3z5gj5iyuwgqao562bo4bdf&cid=bafkreifcmvhjv5rwsnqcg7beibg5y7xuvw7cnj6ryti7eqqbhqls4e6iwm" alt="A band on a small stage under a row of spotlights, the crowd below them in silhouette " width="2995" height="4000" loading="lazy" />157 </div>158 </article>159160 <article class="post-item post-item--repost" id="3mxffhxusws2o">161 <p class="post-item-meta">162 <span><span class="post-item-label">reposted</span> <a class="post-item-time" href="/posts/#3mxffhxusws2o"><time datetime="2026-10-08T21:24:37.374Z">8 Oct 2026, 2:24 pm</time></a></span>163 <a class="post-item-reply" href="https://bsky.app/profile/did:plc:x5leeami62gbmjekf7ro6sqo/post/3juhp6h6uw32g">reply on bluesky</a>164 </p>165 <div class="post-item-repost">166 <p class="post-item-card-meta">jenn schiffer 😎 <span>@jennschiffer.com</span></p>167 <p class="post-item-body">i just keep getting hotter and smarter</p>168 </div>169 </article>170171 <article class="post-item" id="3mxfdssp34s2p">172 <p class="post-item-meta">173 <a class="post-item-time" href="/posts/#3mxfdssp34s2p"><time datetime="2026-10-08T20:54:53.604Z">8 Oct 2026, 1:54 pm</time></a>174 <a class="post-item-reply" href="https://bsky.app/profile/danieldaum.net/post/3mxfdssp34s2p">reply on bluesky</a>175 </p>176 <p class="post-item-body">hi</p>177 </article>178 <!-- /posts:all -->179 </section>180 </main>181182 <!-- ===== FOOTER ===== -->183 <footer>184 <nav aria-label="site links">185 <p aria-hidden="true">//</p>186 <a href="mailto:daniel@danieldaum.net"> email </a>187 <a188 href="https://tangled.org/danieldaum.net"189 aria-label="git (opens in new tab)"190 target="_blank"191 rel="noopener noreferrer"192 >git193 </a>194 <a href="/pgp.asc" aria-label="PGP public key (516E97FF)"195 >PGP</a196 >197 <a href="/changelog/">changelog</a>198 <a href="/privacy/">privacy</a>199 <a href="/feed.xml">feed</a>200 </nav>201 </footer>202 </body>203</html>
privacy/index.html
+2 −22
@@ -129,30 +129,10 @@129129 I don't know who visits this site.130130 </p>131131132 <p>133 If you like a post, I store a count for that page, and a134 scrambled code made from your IP, browser, and the date, so135 you can't like twice in a day. It can't be turned back into136 your IP, and it's deleted after two days.137 </p>138139 <p>140 If you comment, you send it to me by email. Your address is141 checked once, to see if the comment is from me, and then142 forgotten. It is never saved, hashed, or logged. What's143 saved is the name from your "name:" line, your comment, the144 post, and the time, and all of that is shown on the post.145 Quoted replies and signatures are cut off first. I get an146 email with your name and comment, not your address, so I can147 delete it, or approve it if it has a link. If you want a148 comment taken down, email me.149 </p>150151132 <p>152133 This site is hosted on Cloudflare Pages, so Cloudflare sees153 your IP address and the page you asked for, and comment154 emails arrive through Cloudflare too. I haven't enabled155 request logging, so I never see your IP. Cloudflare's134 your IP address and the page you asked for. I haven't135 enabled request logging, so I never see your IP. Cloudflare's156136 privacy policy is157137 <a href="https://www.cloudflare.com/privacypolicy/">here</a158138 >.
projects/holonet/index.html
+0 −3
@@ -199,7 +199,6 @@199199 />200200 </svg>201201 </div>202 <!-- filled by scripts/sync-commits.mjs -->203202 <div class="commit-log">204203 <div class="commit-log-head">205204 <span>recent commits</span>@@ -208,7 +207,6 @@208207 >all commits →</a209208 >210209 </div>211 <!-- commits:holonet:6 -->212210 <ol class="commit-log-list">213211 <li class="commit-log-row">214212 <span class="commit-log-hash">6e99263</span>@@ -241,7 +239,6 @@241239 <time class="commit-log-date" datetime="2026-09-09T14:38:45-07:00">09 Sep 26</time>242240 </li>243241 </ol>244 <!-- /commits:holonet:6 -->245242 </div>246243 </section>247244
projects/index.html
+0 −3
@@ -138,10 +138,8 @@138138 </div>139139 </div>140140 <div class="project-card-right">141 <!-- filled by scripts/sync-commits.mjs -->142141 <div class="commit-log" aria-hidden="true">143142 <div class="commit-log-head">recent commits</div>144 <!-- commits:holonet:4 -->145143 <ol class="commit-log-list">146144 <li class="commit-log-row">147145 <span class="commit-log-hash">6e99263</span>@@ -164,7 +162,6 @@164162 <time class="commit-log-date" datetime="2026-09-09T15:27:32-07:00">09 Sep 26</time>165163 </li>166164 </ol>167 <!-- /commits:holonet:4 -->168165 </div>169166 </div>170167 </a>
schema.sqldeleted
+0 −28
@@ -1,28 +0,0 @@1-- likes: one row per post2CREATE TABLE IF NOT EXISTS Likes (3 page TEXT PRIMARY KEY,4 count INTEGER NOT NULL DEFAULT 05);67-- who liked what today: a daily-rotating hash, never an ip or email8CREATE TABLE IF NOT EXISTS LikeVoters (9 page TEXT NOT NULL,10 voter TEXT NOT NULL,11 created_at TEXT NOT NULL,12 PRIMARY KEY (page, voter)13);1415-- comments: arrive by email. ones with links are hidden until approved.16-- nothing about the sender is kept, not even a hash of their address17CREATE TABLE IF NOT EXISTS Comments (18 id TEXT PRIMARY KEY,19 page TEXT NOT NULL,20 parent TEXT,21 name TEXT NOT NULL,22 body TEXT NOT NULL,23 is_author INTEGER NOT NULL DEFAULT 0,24 approved INTEGER NOT NULL DEFAULT 0,25 created_at TEXT NOT NULL26);2728CREATE INDEX IF NOT EXISTS idx_comments_page ON Comments (page, approved, created_at);
scripts/sync-commits.mjsdeleted
+0 −92
@@ -1,92 +0,0 @@1// pulls recent commits from my repos on tangled and writes them into the2// static html.3// run with `mise run sync-commits`. no dependencies, node 18+.4//5// a page opts in with a pair of marker comments naming the repo and how many6// commits to show; everything between them is replaced on every run:7//8// <!-- commits:holonet:6 -->...<!-- /commits:holonet:6 -->9//10// commits come from main, newest first, read from the knot that hosts my11// repos (no login needed). if it can't be reached, the script exits non-zero12// and touches nothing.1314import { readFile, writeFile } from "node:fs/promises";1516const KNOT = "https://knot1.tangled.sh";17const OWNER = "did:plc:e3z5gj5iyuwgqao562bo4bdf"; // danieldaum.net18const TZ = "America/Los_Angeles";1920const PAGES = ["projects/index.html", "projects/holonet/index.html"];2122const MARKER = /^([ \t]*)<!-- commits:([\w.-]+):(\d+) -->[\s\S]*?<!-- \/commits:\2:\3 -->/gm;2324// ---------------------------------------------------------------------------25// data2627async function fetchCommits(repo, limit) {28 const url = new URL("/xrpc/sh.tangled.repo.log", KNOT);29 url.searchParams.set("repo", `${OWNER}/${repo}`);30 url.searchParams.set("ref", "main");31 url.searchParams.set("limit", String(limit));32 const res = await fetch(url);33 if (!res.ok) throw new Error(`${repo} commits: ${res.status} ${res.statusText}`);34 const { commits } = await res.json();35 return commits.map((c) => ({ sha: c.this, message: c.message, date: c.author.When }));36}3738// ---------------------------------------------------------------------------39// html4041function render(commits) {42 if (commits.length === 0) return `<p class="commit-log-row">no commits yet</p>`;43 const rows = commits.map((c) =>44 [45 ` <li class="commit-log-row">`,46 ` <span class="commit-log-hash">${c.sha.slice(0, 7)}</span>`,47 ` <span class="commit-log-msg">${esc(c.message.split("\n")[0])}</span>`,48 ` <time class="commit-log-date" datetime="${esc(c.date)}">${formatDate(c.date)}</time>`,49 ` </li>`,50 ].join("\n"),51 );52 return [`<ol class="commit-log-list">`, ...rows, `</ol>`].join("\n");53}5455// 09 Sep 26, like the writing list. en-US, because en-GB says "Sept"56function formatDate(iso) {57 const parts = new Intl.DateTimeFormat("en-US", { timeZone: TZ, day: "2-digit", month: "short", year: "2-digit" }).formatToParts(new Date(iso));58 const get = (type) => parts.find((p) => p.type === type).value;59 return `${get("day")} ${get("month")} ${get("year")}`;60}6162function esc(s) {63 return String(s).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);64}6566// ---------------------------------------------------------------------------67// writing6869const pages = await Promise.all(PAGES.map((page) => readFile(page, "utf8")));7071// one request per repo, for the most commits any marker asks for72const wanted = new Map();73for (const html of pages) {74 for (const [, , repo, n] of html.matchAll(MARKER)) {75 wanted.set(repo, Math.max(wanted.get(repo) ?? 0, Number(n)));76 }77}78const commits = new Map();79for (const [repo, n] of wanted) commits.set(repo, await fetchCommits(repo, n));8081for (const [i, page] of PAGES.entries()) {82 const before = pages[i];83 const after = before.replace(MARKER, (_, indent, repo, n) => {84 const body = render(commits.get(repo).slice(0, Number(n))).replace(/^(?=.)/gm, indent);85 return `${indent}<!-- commits:${repo}:${n} -->\n${body}\n${indent}<!-- /commits:${repo}:${n} -->`;86 });87 if (after !== before) {88 await writeFile(page, after);89 console.log(`updated ${page}`);90 }91}92for (const [repo, list] of commits) console.log(`${repo}: ${list.length} commit${list.length === 1 ? "" : "s"}`);
scripts/sync-posts.mjsdeleted
+0 −425
@@ -1,425 +0,0 @@1// pulls my bluesky posts from my pds and writes them into the static html.2// run with `mise run sync-posts`. no dependencies, node 18+.3//4// a page opts in with a pair of marker comments; everything between them is5// replaced on every run:6//7// <!-- posts:all -->...<!-- /posts:all --> every post8// <!-- posts:3 -->...<!-- /posts:3 --> the newest 39// <!-- posts:highlight -->...<!-- /posts:highlight --> the newest one as10// a card (/, /blog/)11//12// my own top-level posts and my reposts are kept, newest first; replies are13// dropped. a repost shows the original post, the way bluesky does.14//15// my pds only holds my own records, so reposted posts, quoted posts and video16// thumbnails and streams are looked up on bluesky's public api. that happens17// here, at sync time, never when a page loads. if it fails, they fall back to18// plain links.19//20// if the pds21// can't be reached, or comes back empty while the site still has posts, the22// script exits non-zero and touches nothing (--force allows the empty case).2324import { readFile, writeFile } from "node:fs/promises";2526const PDS = "https://pds.danieldaum.net";27const DID = "did:plc:e3z5gj5iyuwgqao562bo4bdf";28const HANDLE = "danieldaum.net";29const APPVIEW = "https://public.api.bsky.app";30const TZ = "America/Los_Angeles";3132const PAGES = ["posts/index.html", "blog/index.html", "index.html"];3334// ---------------------------------------------------------------------------35// data3637async function fetchPosts() {38 const posts = (await listRecords("app.bsky.feed.post"))39 .filter((r) => typeof r.value?.text === "string" && !r.value.reply)40 .map((r) => ({ uri: r.uri, rkey: rkeyOf(r.uri), ...r.value }));4142 const reposts = (await listRecords("app.bsky.feed.repost"))43 .filter((r) => typeof r.value?.subject?.uri === "string")44 .map((r) => ({ rkey: rkeyOf(r.uri), createdAt: r.value.createdAt, subjectUri: r.value.subject.uri }));4546 const views = await fetchViews([...posts.map((p) => p.uri), ...reposts.map((r) => r.subjectUri)]);47 for (const post of posts) post.view = views.get(post.uri)?.embed;48 for (const repost of reposts) repost.subject = views.get(repost.subjectUri);4950 return [...posts, ...reposts].sort((a, b) => Date.parse(b.createdAt) - Date.parse(a.createdAt));51}5253async function listRecords(collection) {54 const records = [];55 let cursor;56 do {57 const url = new URL("/xrpc/com.atproto.repo.listRecords", PDS);58 url.searchParams.set("repo", DID);59 url.searchParams.set("collection", collection);60 url.searchParams.set("limit", "100");61 if (cursor) url.searchParams.set("cursor", cursor);62 const res = await fetch(url);63 if (!res.ok) throw new Error(`listRecords ${collection}: ${res.status} ${res.statusText}`);64 const page = await res.json();65 records.push(...page.records);66 cursor = page.records.length > 0 ? page.cursor : undefined;67 } while (cursor);68 return records;69}7071function rkeyOf(uri) {72 return uri.split("/").pop();73}7475// the appview's hydrated copy of each post: reposted and quoted post text,76// image and video thumbnails. getPosts takes 25 uris per call77async function fetchViews(uris) {78 const views = new Map();79 try {80 for (let i = 0; i < uris.length; i += 25) {81 const url = new URL("/xrpc/app.bsky.feed.getPosts", APPVIEW);82 for (const uri of uris.slice(i, i + 25)) url.searchParams.append("uris", uri);83 const res = await fetch(url);84 if (!res.ok) throw new Error(`getPosts: ${res.status}`);85 for (const view of (await res.json()).posts) views.set(view.uri, view);86 }87 } catch (err) {88 console.warn(`appview lookup failed, reposts, quotes and videos will be plain links (${err.message})`);89 }90 return views;91}9293// ---------------------------------------------------------------------------94// rendering9596function renderItem(item) {97 return item.subjectUri ? renderRepost(item) : renderPost(item);98}99100function renderPost(post) {101 const permalink = `/posts/#${post.rkey}`;102 const bsky = `https://bsky.app/profile/${HANDLE}/post/${post.rkey}`;103 const lines = [104 `<article class="post-item" id="${esc(post.rkey)}">`,105 ` <p class="post-item-meta">`,106 ` <a class="post-item-time" href="${permalink}"><time datetime="${esc(post.createdAt)}">${formatDate(post.createdAt)}</time></a>`,107 ` <a class="post-item-reply" href="${bsky}">reply on bluesky</a>`,108 ` </p>`,109 ];110 if (post.text.trim()) {111 lines.push(` <p class="post-item-body">${renderText(post.text, post.facets)}</p>`);112 }113 lines.push(...renderEmbed(post.embed, post.view, DID, bsky).map((l) => ` ${l}`));114 lines.push(`</article>`);115 return lines.join("\n");116}117118// the original post inside a card. the reply link goes to the original119function renderRepost(repost) {120 const permalink = `/posts/#${repost.rkey}`;121 const href = postHref(repost.subjectUri);122 const subject = repost.subject;123 const lines = [124 `<article class="post-item post-item--repost" id="${esc(repost.rkey)}">`,125 ` <p class="post-item-meta">`,126 ` <span><span class="post-item-label">reposted</span> <a class="post-item-time" href="${permalink}"><time datetime="${esc(repost.createdAt)}">${formatDate(repost.createdAt)}</time></a></span>`,127 ` <a class="post-item-reply" href="${href}">reply on bluesky</a>`,128 ` </p>`,129 ];130 if (!subject || typeof subject.record?.text !== "string") {131 lines.push(` <p class="post-item-note"><a href="${href}">reposted post → view on bluesky</a></p>`);132 } else {133 const author = subject.author?.displayName || subject.author?.handle || "";134 lines.push(135 ` <div class="post-item-repost">`,136 ` <p class="post-item-card-meta">${escText(author)} <span>@${escText(subject.author?.handle || "")}</span></p>`,137 );138 if (subject.record.text.trim()) {139 lines.push(` <p class="post-item-body">${renderText(subject.record.text, subject.record.facets)}</p>`);140 }141 const did = subject.author?.did;142 lines.push(...renderEmbed(subject.record.embed, subject.embed, did, href).map((l) => ` ${l}`));143 lines.push(` </div>`);144 }145 lines.push(`</article>`);146 return lines.join("\n");147}148149// the newest post as a card, set apart from the lists around it. links to150// the post on /posts/151function renderHighlight(item) {152 const subject = item.subjectUri ? item.subject : null;153 const record = item.subjectUri ? subject?.record : item;154 const author = subject ? `${subject.author?.displayName || subject.author?.handle || ""}: ` : "";155 const extras = attachments(record?.embed);156 const text = record?.text?.trim() || extras.join(", ") || "view post";157 return [158 `<a class="post-card" href="/posts/#${esc(item.rkey)}">`,159 ` <span class="post-card-meta">`,160 ` <span>${item.subjectUri ? "↻ reposted" : "@" + HANDLE}</span>`,161 ` <time datetime="${esc(item.createdAt)}">${formatDate(item.createdAt)}</time>`,162 ` </span>`,163 ` <span class="post-card-text">${escText(author + text)}</span>`,164 extras.length ? ` <span class="post-card-extra">${escText(extras.join(" · "))}</span>` : null,165 `</a>`,166 ].filter((l) => l !== null).join("\n");167}168169// "2 images", "video", "gif", "link", "quote"170function attachments(embed) {171 switch (embed?.$type) {172 case "app.bsky.embed.images": {173 const n = embed.images?.length || 0;174 return n ? [n === 1 ? "1 image" : `${n} images`] : [];175 }176 case "app.bsky.embed.video":177 return ["video"];178 case "app.bsky.embed.external":179 return [klipyGif(embed.external?.uri) ? "gif" : "link"];180 case "app.bsky.embed.record":181 return ["quote"];182 case "app.bsky.embed.recordWithMedia":183 return [...attachments(embed.media), "quote"];184 default:185 return [];186 }187}188189// facets index the text by utf-8 byte offset, not by js string index190function renderText(text, facets = []) {191 const bytes = new TextEncoder().encode(text);192 const decode = (from, to) => new TextDecoder().decode(bytes.slice(from, to));193 const sorted = facets194 .filter((f) => f.index && f.features?.length)195 .sort((a, b) => a.index.byteStart - b.index.byteStart);196197 let out = "";198 let pos = 0;199 for (const facet of sorted) {200 const { byteStart, byteEnd } = facet.index;201 if (byteStart < pos) continue;202 out += escText(decode(pos, byteStart));203 const label = escText(decode(byteStart, byteEnd));204 const href = facetHref(facet.features[0]);205 out += href ? `<a href="${esc(href)}">${label}</a>` : label;206 pos = byteEnd;207 }208 return out + escText(decode(pos));209}210211function facetHref(feature) {212 switch (feature.$type) {213 case "app.bsky.richtext.facet#link":214 return /^https?:\/\//.test(feature.uri) ? feature.uri : null;215 case "app.bsky.richtext.facet#mention":216 return `https://bsky.app/profile/${feature.did}`;217 case "app.bsky.richtext.facet#tag":218 return `https://bsky.app/hashtag/${encodeURIComponent(feature.tag)}`;219 default:220 return null;221 }222}223224// `view` is the appview's copy of the same embed, possibly missing. `did` is225// the post author's: only my own images come straight from my pds. a quote226// with media carries the media one level down, in both227function renderEmbed(embed, view, did, bsky) {228 if (!embed) return [];229 switch (embed.$type) {230 case "app.bsky.embed.images":231 return renderImages(embed.images, view?.images, did);232 case "app.bsky.embed.video":233 return renderVideo(embed, view, did, bsky);234 case "app.bsky.embed.external":235 return renderGif(embed.external, view?.external, did) ?? renderCard(embed.external);236 case "app.bsky.embed.record":237 return renderQuote(embed.record, view?.record);238 case "app.bsky.embed.recordWithMedia":239 return [240 ...renderEmbed(embed.media, view?.media, did, bsky),241 ...renderQuote(embed.record?.record, view?.record?.record),242 ];243 default:244 return [];245 }246}247248// one image keeps its shape; two or more go in a cropped grid, like bluesky.249// someone else's images come from bluesky's cdn, via the appview250function renderImages(images = [], views = [], did) {251 const imgs = images252 .map((img, i) => ({ img, src: did === DID ? img.image?.ref?.$link && blobUrl(img.image.ref.$link) : views[i]?.thumb }))253 .filter(({ src }) => typeof src === "string" && /^https:\/\//.test(src))254 .map(({ img, src }) => `<img src="${esc(src)}" alt="${esc(img.alt || "")}"${sizeAttrs(img.aspectRatio)} loading="lazy" />`);255 if (imgs.length === 0) return [];256 const cls = imgs.length === 1 ? "post-item-media" : "post-item-media post-item-media--grid";257 return [`<div class="${cls}">`, ...imgs.map((i) => ` ${i}`), `</div>`];258}259260// my own videos play here, nothing loads until play. the pds can't serve261// range requests, which safari needs, so safari streams bluesky's hls copy262// and other browsers skip it for the file on the pds (no type: they try it263// whatever the container). someone else's video is bluesky's thumbnail,264// linking there to watch265function renderVideo(embed, view, did, bsky) {266 const thumb = view?.thumbnail;267 if (!thumb || !/^https:\/\//.test(thumb)) {268 return [`<p class="post-item-note"><a href="${bsky}">video → watch on bluesky</a></p>`];269 }270 const ref = embed.video?.ref?.$link;271 if (did === DID && ref && /^https:\/\//.test(view.playlist || "")) {272 const label = embed.alt ? ` aria-label="${esc(embed.alt)}"` : "";273 return [274 `<video class="post-item-player" poster="${esc(thumb)}"${sizeAttrs(embed.aspectRatio)}${label} controls preload="none" playsinline>`,275 ` <source src="${esc(view.playlist)}" type="application/vnd.apple.mpegurl" />`,276 ` <source src="${esc(blobUrl(ref))}" />`,277 ` <a href="${bsky}">video → watch on bluesky</a>`,278 `</video>`,279 ];280 }281 const alt = embed.alt ? `${embed.alt} (video, plays on bluesky)` : "video, plays on bluesky";282 return [283 `<a class="post-item-video" href="${bsky}">`,284 ` <img src="${esc(thumb)}" alt="${esc(alt)}"${sizeAttrs(embed.aspectRatio)} loading="lazy" />`,285 `</a>`,286 ];287}288289// a gif from bluesky's picker is a link card to klipy. like bluesky, play its290// mp4 from bluesky's proxy, so visitors never reach klipy. the card's thumb is291// the still frame shown with reduced motion. alt text is the description,292// which bluesky saves as "Alt: ..."293function renderGif(external, view, did) {294 const gif = klipyGif(external?.uri);295 if (!gif) return null;296 const ref = external.thumb?.ref?.$link;297 const still = did === DID ? ref && blobUrl(ref) : view?.thumb;298 const alt = (external.description || external.title || "gif").replace(/^Alt: /, "");299 const size = sizeAttrs(gif.size);300 const hasStill = typeof still === "string" && /^https:\/\//.test(still);301 return [302 `<div class="post-item-gif">`,303 ` <video src="${esc(gif.src)}"${hasStill ? ` poster="${esc(still)}"` : ""}${size} role="img" aria-label="${esc(alt)}" autoplay loop muted playsinline></video>`,304 hasStill ? ` <img src="${esc(still)}" alt="${esc(alt)}"${size} loading="lazy" />` : null,305 `</div>`,306 ].filter((l) => l !== null);307}308309// static.klipy.com/ii/<path>/<name>.gif?hh=<h>&ww=<w>&mp4=<slug>310// -> k.gifs.bsky.app/ii/<path>/<slug>.mp4, the way bluesky's app builds it311function klipyGif(uri) {312 let url;313 try {314 url = new URL(uri);315 } catch {316 return null;317 }318 const slug = url.searchParams.get("mp4");319 if (url.hostname !== "static.klipy.com" || !url.pathname.startsWith("/ii/") || !/^[\w-]+$/.test(slug || "")) return null;320 const src = new URL(url.pathname.replace(/[^/]+$/, `${slug}.mp4`), "https://k.gifs.bsky.app");321 return { src: src.href, size: { width: Number(url.searchParams.get("ww")), height: Number(url.searchParams.get("hh")) } };322}323324function sizeAttrs(ratio) {325 return ratio?.width && ratio?.height ? ` width="${ratio.width}" height="${ratio.height}"` : "";326}327328function renderCard(external) {329 if (!external?.uri || !/^https?:\/\//.test(external.uri)) return [];330 const domain = new URL(external.uri).hostname.replace(/^www\./, "");331 return [332 `<a class="post-item-card" href="${esc(external.uri)}">`,333 ` <span class="post-item-card-title">${escText(external.title || domain)}</span>`,334 external.description ? ` <span class="post-item-card-desc">${escText(external.description)}</span>` : null,335 ` <span class="post-item-card-meta">${escText(domain)}</span>`,336 `</a>`,337 ].filter((l) => l !== null);338}339340// with the appview's copy, the quoted text shows as a card341function renderQuote(ref, view) {342 const href = postHref(ref?.uri);343 if (!href) return [];344 const text = view?.$type === "app.bsky.embed.record#viewRecord" ? view.value?.text : null;345 if (typeof text !== "string") {346 return [`<p class="post-item-note"><a href="${href}">quoting →</a></p>`];347 }348 const author = view.author?.displayName || view.author?.handle || "";349 return [350 `<a class="post-item-card post-item-quote" href="${href}">`,351 ` <span class="post-item-card-meta">${escText(author)} <span>@${escText(view.author?.handle || "")}</span></span>`,352 ` <span class="post-item-quote-text">${escText(text)}</span>`,353 `</a>`,354 ];355}356357// at://did/app.bsky.feed.post/rkey -> https://bsky.app/profile/did/post/rkey358function postHref(uri) {359 const match = /^at:\/\/([^/]+)\/app\.bsky\.feed\.post\/([^/]+)$/.exec(uri || "");360 return match ? `https://bsky.app/profile/${match[1]}/post/${match[2]}` : null;361}362363function blobUrl(cid) {364 const url = new URL("/xrpc/com.atproto.sync.getBlob", PDS);365 url.searchParams.set("did", DID);366 url.searchParams.set("cid", cid);367 return url.toString();368}369370// 8 Oct 2026, 1:42 pm371function formatDate(iso) {372 const d = new Date(iso);373 const day = d.toLocaleDateString("en-GB", { timeZone: TZ, day: "numeric", month: "short", year: "numeric" });374 const time = d.toLocaleTimeString("en-US", { timeZone: TZ, hour: "numeric", minute: "2-digit" }).toLowerCase();375 return `${day}, ${time}`;376}377378function escText(s) {379 return s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/\n/g, "<br />");380}381382function esc(s) {383 return String(s).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);384}385386// ---------------------------------------------------------------------------387// writing388389const MARKER = /^([ \t]*)<!-- posts:(all|highlight|\d+) -->[\s\S]*?<!-- \/posts:\2 -->/gm;390391function fill(html, posts) {392 return html.replace(MARKER, (_, indent, mode) => {393 let body;394 if (posts.length === 0) {395 body = `<p class="meta">no posts yet</p>`;396 } else if (mode === "highlight") {397 body = renderHighlight(posts[0]);398 } else {399 body = (mode === "all" ? posts : posts.slice(0, Number(mode))).map(renderItem).join("\n\n");400 }401 const indented = body.replace(/^(?=.)/gm, indent);402 return `${indent}<!-- posts:${mode} -->\n${indented}\n${indent}<!-- /posts:${mode} -->`;403 });404}405406const posts = await fetchPosts();407const pages = await Promise.all(PAGES.map((page) => readFile(page, "utf8")));408409// an empty pds while the site still has posts looks like a reset pds, not410// a deliberate wipe. refuse unless told otherwise411if (posts.length === 0 && !process.argv.includes("--force") && pages.some((html) => html.includes('class="post-item'))) {412 console.error("the pds has no posts but the site does. nothing changed.");413 console.error("if you really deleted everything: mise run sync-posts -- --force");414 process.exit(1);415}416417for (const [i, page] of PAGES.entries()) {418 const before = pages[i];419 const after = fill(before, posts);420 if (after !== before) {421 await writeFile(page, after);422 console.log(`updated ${page}`);423 }424}425console.log(`${posts.length} post${posts.length === 1 ? "" : "s"}`);
scripts/sync-standard.mjsdeleted
+0 −268
@@ -1,268 +0,0 @@1// publishes my long-form writing to atproto as standard.site records, so2// atproto readers (leaflet, pckt, ...) can find and follow it. metadata only:3// title, description, date, path, tags and the banner as a cover. the post4// itself stays here. run with `mise run sync-standard`, or the sync button.5//6// what gets published is the writing list on /blog/: every row except notes7// (#game, #movie, #show, #book, #album). each post's record key comes from its8// date, so the same post always maps to the same record and this script can9// write the <link rel="site.standard.document"> tag into the page itself.10//11// needs ATPROTO_APP_PASSWORD (a bluesky app password). without it the script12// says so and exits without doing anything.1314import { readFile, writeFile } from "node:fs/promises";15import { createHash } from "node:crypto";1617const PDS = "https://pds.danieldaum.net";18const DID = "did:plc:e3z5gj5iyuwgqao562bo4bdf";19const SITE = "https://danieldaum.net";20const NOTE_TAGS = new Set(["game", "movie", "show", "book", "album"]);21const MAX_BLOB = 1_000_000;22const ASSETS = "https://assets.danieldaum.net";23const COVER_RESIZE = "width=1600,quality=80,format=webp";2425const PUBLICATION = {26 rkey: tid(Date.parse("2026-01-01T00:00:00Z") * 1000, 0),27 name: "daniel daum",28 description: "everything i write, in one place",29 icon: "assets/favicon/android-chrome-512x512.png",30};31const PUBLICATION_URI = `at://${DID}/site.standard.publication/${PUBLICATION.rkey}`;3233// ---------------------------------------------------------------------------34// what to publish3536// rows of the writing list: <a class="archive-row" href> title, tag, date37async function readWritingList() {38 const html = await readFile("blog/index.html", "utf8");39 const rows = [...html.matchAll(/<a class="archive-row" href="([^"]+)">([\s\S]*?)<\/a>/g)];40 return rows41 .map(([, path, inner]) => ({42 path,43 title: decode(/<span class="archive-title">([\s\S]*?)<\/span>/.exec(inner)?.[1]?.trim() || ""),44 tag: /<span class="archive-tag">#([^<]+)<\/span>/.exec(inner)?.[1]?.trim() || "",45 date: /datetime="(\d{4}-\d{2}-\d{2})"/.exec(inner)?.[1] || "",46 }))47 .filter((row) => row.path.startsWith("/") && row.title && row.date && !NOTE_TAGS.has(row.tag));48}4950// the page behind a row: its file, description and banner51async function readPage(path) {52 const file = `${path.replace(/^\//, "")}index.html`;53 const html = await readFile(file, "utf8");54 const description = /<meta\s+name="description"\s+content="([^"]*)"/.exec(html)?.[1];55 const banner = /class="post-banner[^"]*"[\s\S]*?<img[\s\S]*?src="([^"]+)"/.exec(html)?.[1];56 return { file, html, description: description && decode(description), banner };57}5859// ---------------------------------------------------------------------------60// records6162async function documentRecord(row, page, session) {63 const record = {64 $type: "site.standard.document",65 site: PUBLICATION_URI,66 path: row.path,67 title: row.title,68 publishedAt: `${row.date}T12:00:00.000Z`,69 };70 if (page.description) record.description = page.description;71 if (row.tag) record.tags = [row.tag];72 const cover = await coverBlob(page.banner, session);73 if (cover) record.coverImage = cover;74 return record;75}7677// the banner, if it's under the 1MB limit. if it's bigger, a smaller copy78// from cloudflare's image resizing (the original on r2 is left alone)79async function coverBlob(url, session) {80 if (!url) return null;81 const candidates = [url];82 if (url.startsWith(`${ASSETS}/`)) {83 candidates.push(url.replace(`${ASSETS}/`, `${ASSETS}/cdn-cgi/image/${COVER_RESIZE}/`));84 }85 for (const candidate of candidates) {86 const res = await fetch(candidate);87 if (!res.ok) continue;88 const bytes = new Uint8Array(await res.arrayBuffer());89 if (bytes.length <= MAX_BLOB) {90 return blob(bytes, res.headers.get("content-type") || "image/webp", session);91 }92 }93 console.warn(` no cover: ${url} is over 1MB and couldn't be resized`);94 return null;95}9697// a blob ref for these bytes. only uploads when the pds doesn't already have98// them: atproto blob ids are a hash of the bytes, worked out here first99async function blob(bytes, mimeType, session) {100 const ref = { $type: "blob", ref: { $link: cid(bytes) }, mimeType, size: bytes.length };101 session.blobs.push({ ref, bytes });102 return ref;103}104105async function uploadBlobs(blobs, session) {106 for (const { ref, bytes } of blobs) {107 const res = await xrpc("com.atproto.repo.uploadBlob", session, bytes, ref.mimeType);108 const uploaded = (await res.json()).blob;109 if (uploaded.ref.$link !== ref.ref.$link) {110 throw new Error(`blob id mismatch for ${ref.ref.$link}`);111 }112 // the record carries whatever type the pds settled on113 ref.mimeType = uploaded.mimeType;114 }115}116117// create or update a record, only when it differs from what's there118async function putIfChanged(collection, rkey, record, session) {119 const url = new URL("/xrpc/com.atproto.repo.getRecord", PDS);120 url.searchParams.set("repo", DID);121 url.searchParams.set("collection", collection);122 url.searchParams.set("rkey", rkey);123 const res = await fetch(url);124 const existing = res.ok ? (await res.json()).value : null;125 if (existing && canonical(existing) === canonical(record)) {126 session.blobs.length = 0;127 return false;128 }129 await uploadBlobs(session.blobs, session);130 session.blobs.length = 0;131 await xrpc("com.atproto.repo.putRecord", session, { repo: DID, collection, rkey, record });132 return true;133}134135// ---------------------------------------------------------------------------136// the page side137138// <link rel="site.standard.document"> in the page's <head>, added or fixed139function withLinkTag(html, uri) {140 const tag = `<link rel="site.standard.document" href="${uri}" />`;141 if (/<link rel="site\.standard\.document"[^>]*>/.test(html)) {142 return html.replace(/<link rel="site\.standard\.document"[^>]*>/, tag);143 }144 return html.replace(/\n([ \t]*)<\/head>/, (_, indent) => `\n${indent} ${tag}\n${indent}</head>`);145}146147// ---------------------------------------------------------------------------148// atproto plumbing149150async function login() {151 const res = await fetch(new URL("/xrpc/com.atproto.server.createSession", PDS), {152 method: "POST",153 headers: { "content-type": "application/json" },154 body: JSON.stringify({ identifier: DID, password: process.env.ATPROTO_APP_PASSWORD }),155 });156 if (!res.ok) throw new Error(`login failed: ${res.status} ${await res.text()}`);157 return { jwt: (await res.json()).accessJwt, blobs: [] };158}159160async function xrpc(method, session, body, contentType = "application/json") {161 const res = await fetch(new URL(`/xrpc/${method}`, PDS), {162 method: "POST",163 headers: { "content-type": contentType, authorization: `Bearer ${session.jwt}` },164 body: contentType === "application/json" ? JSON.stringify(body) : body,165 });166 if (!res.ok) throw new Error(`${method}: ${res.status} ${await res.text()}`);167 return res;168}169170// a record key: microseconds since 1970 and a 10-bit clock id, as 13 base32171// characters. same inputs, same key172function tid(micros, clockId) {173 const alphabet = "234567abcdefghijklmnopqrstuvwxyz";174 let n = (BigInt(micros) << 10n) | BigInt(clockId & 1023);175 let out = "";176 for (let i = 0; i < 13; i++) {177 out = alphabet[Number(n & 31n)] + out;178 n >>= 5n;179 }180 return out;181}182183// cidv1, raw codec, sha2-256, base32: how atproto names blobs184function cid(bytes) {185 const digest = createHash("sha256").update(bytes).digest();186 const raw = Uint8Array.from([0x01, 0x55, 0x12, 0x20, ...digest]);187 const alphabet = "abcdefghijklmnopqrstuvwxyz234567";188 let bits = 0;189 let value = 0;190 let out = "b";191 for (const byte of raw) {192 value = (value << 8) | byte;193 bits += 8;194 while (bits >= 5) {195 out += alphabet[(value >>> (bits - 5)) & 31];196 bits -= 5;197 }198 }199 if (bits > 0) out += alphabet[(value << (5 - bits)) & 31];200 return out;201}202203// json with sorted keys, so two records compare equal whatever their key order204function canonical(value) {205 if (Array.isArray(value)) return `[${value.map(canonical).join(",")}]`;206 if (value && typeof value === "object") {207 return `{${Object.keys(value).sort().map((k) => `${JSON.stringify(k)}:${canonical(value[k])}`).join(",")}}`;208 }209 return JSON.stringify(value);210}211212function decode(s) {213 return s214 .replace(/'|'/g, "'")215 .replace(/"/g, '"')216 .replace(/</g, "<")217 .replace(/>/g, ">")218 .replace(/—/g, "—")219 .replace(/&/g, "&");220}221222// keeps two posts on the same day apart223function clockIdFor(path) {224 return createHash("sha256").update(path).digest().readUInt16BE(0) & 1023;225}226227// ---------------------------------------------------------------------------228// run229230if (!process.env.ATPROTO_APP_PASSWORD) {231 console.log("standard.site: ATPROTO_APP_PASSWORD isn't set, skipping");232 process.exit(0);233}234235const session = await login();236237const icon = await readFile(PUBLICATION.icon);238const publication = {239 $type: "site.standard.publication",240 url: SITE,241 name: PUBLICATION.name,242 description: PUBLICATION.description,243 icon: await blob(icon, "image/png", session),244};245if (await putIfChanged("site.standard.publication", PUBLICATION.rkey, publication, session)) {246 console.log("updated the publication record");247}248249// the other half of the publication's proof: the domain points back at it250const wellKnown = ".well-known/site.standard.publication";251const currentWellKnown = await readFile(wellKnown, "utf8").catch(() => "");252if (currentWellKnown !== PUBLICATION_URI) {253 await writeFile(wellKnown, PUBLICATION_URI);254 console.log(`updated ${wellKnown}`);255}256257const rows = await readWritingList();258for (const row of rows) {259 const page = await readPage(row.path);260 const rkey = tid(Date.parse(`${row.date}T12:00:00Z`) * 1000, clockIdFor(row.path));261 const uri = `at://${DID}/site.standard.document/${rkey}`;262 const record = await documentRecord(row, page, session);263 const changed = await putIfChanged("site.standard.document", rkey, record, session);264 const html = withLinkTag(page.html, uri);265 if (html !== page.html) await writeFile(page.file, html);266 console.log(`${changed ? "published" : "unchanged"} ${row.path}`);267}268console.log(`standard.site: ${rows.length} post${rows.length === 1 ? "" : "s"}`);
scripts/word-count.py
+7 −5
@@ -1,10 +1,12 @@1# word count for the home page's recent writing list. counts words with a2# letter or number in them, from the post body (intro note included) up to the3# likes and comments. usage: python3 scripts/word-count.py now/sep-2026/index.html4import re, sys, html1import html2import re3import sys455h = open(sys.argv[1]).read()667body = h.split("page-header--post", 1)[1].split("</header>", 1)[1]7body = re.split(r'<section\s+class="post-social"', body, 1)[0]8body = body.split("</article>", 1)[0]89body = re.sub(r"<!--.*?-->", " ", body, flags=re.S)910text = html.unescape(re.sub(r"<[^>]+>", " ", body))111012print(len([w for w in text.split() if re.search(r"[A-Za-z0-9]", w)]))
workers/comments/.gitignoredeleted
+0 −1
@@ -1 +0,0 @@1node_modules/
workers/comments/package-lock.jsondeleted
+0 −19
@@ -1,19 +0,0 @@1{2 "name": "saturn-comments",3 "lockfileVersion": 3,4 "requires": true,5 "packages": {6 "": {7 "name": "saturn-comments",8 "dependencies": {9 "postal-mime": "2.4.3"10 }11 },12 "node_modules/postal-mime": {13 "version": "2.4.3",14 "resolved": "https://registry.npmjs.org/postal-mime/-/postal-mime-2.4.3.tgz",15 "integrity": "sha512-KT8P+/We7LH48EhjmLRLEiQx+HI6zZ5TTeuzhuZkMbcJnp9mdmxm/FgiRIzmhZm8mxmk8mtisIAelq1wNwumxg==",16 "license": "MIT-0"17 }18 }19}
workers/comments/package.jsondeleted
+0 −8
@@ -1,8 +0,0 @@1{2 "name": "saturn-comments",3 "private": true,4 "type": "module",5 "dependencies": {6 "postal-mime": "2.4.3"7 }8}
workers/comments/src/index.jsdeleted
+0 −209
@@ -1,209 +0,0 @@1// email worker for comments. cloudflare email routing hands it everything2// sent to reply@replies.danieldaum.net. each message goes through the checks3// below in order; a good one is saved (live, or held if it has a link) and4// daniel gets an email with a link to approve or delete it.5//6// a fixable mistake (bad subject, empty body) bounces so the sender knows.7// anything that looks like abuse is dropped silently, since a bounce would8// go to whoever's address was forged.9//10// the sender's address is used for the author check and then forgotten:11// it is never stored, hashed or logged.1213import PostalMime from "postal-mime";14import { EmailMessage } from "cloudflare:email";15import { hmacHex } from "../../../functions/_lib/hmac.js";16import { isLikeable } from "../../../functions/_lib/likes.js";1718const SITE_URL = "https://danieldaum.net";19const AUTHOR = "daniel@danieldaum.net";20const NOTIFY_FROM = "notify@replies.danieldaum.net";2122// "re: https://danieldaum.net/now/sep-2026/" with an optional23// "#comment-<id>" when replying to a comment. mail apps may add more "re:"s24const SUBJECT_RE = /^\s*(?:re:\s*)*https:\/\/danieldaum\.net(\/[a-z0-9\/-]*)(?:#comment-([0-9a-f-]{36}))?\s*$/i;2526const MAX_PER_HOUR = 20;27const MAX_BODY = 2000;28const MAX_LINKS = 2;29const MAX_NAME = 40;3031export default {32 async email(message, env) {33 // 1. the mail really comes from the domain it claims34 const auth = (message.headers.get("Authentication-Results") || "").toLowerCase();35 if (!auth.includes("dkim=pass") || !(auth.includes("spf=pass") || auth.includes("dmarc=pass"))) {36 console.log("drop: failed authentication");37 return;38 }3940 // 2. site-wide cap, counted from rows only, nothing per sender41 const since = new Date(Date.now() - 60 * 60 * 1000).toISOString();42 const recent = await env.DB.prepare("SELECT COUNT(*) AS n FROM Comments WHERE created_at > ?").bind(since).first();43 if (recent.n >= MAX_PER_HOUR) {44 console.log("drop: hourly cap reached");45 return;46 }4748 const email = await PostalMime.parse(message.raw);4950 // 3. subject names a real post. /now/ itself is excluded because it51 // moves to a new edition; comments belong to the edition52 const match = (email.subject || "").match(SUBJECT_RE);53 const page = match ? match[1].toLowerCase() : "";54 if (!isLikeable(page) || page === "/now/" || !(await pageExists(env, page))) {55 message.setReject("Please use the reply link on the post, so the subject is the post's address");56 return;57 }5859 // 4. a reply to a comment hangs under that comment's top-level60 // comment (one level of nesting). unknown ids become top-level61 const parent = match[2] ? await topLevelParent(env, match[2].toLowerCase(), page) : null;6263 // 5. the text itself, without quoted mail or signatures. everyone64 // but daniel (proven by dmarc) picks their own name65 const { name, body } = cleanBody(email);66 const from = (email.from?.address || "").trim().toLowerCase();67 const isAuthor = from === AUTHOR && auth.includes("dmarc=pass");68 if (!name && !isAuthor) {69 message.setReject(`Please start your comment with a line like "name: sam". That name is shown with your comment`);70 return;71 }72 if (body.length < 2 || body.length > MAX_BODY) {73 message.setReject(`Comments must be between 2 and ${MAX_BODY} characters`);74 return;75 }76 const links = (body.match(/https?:\/\//g) || []).length;77 if (links > MAX_LINKS) {78 message.setReject(`Comments can have at most ${MAX_LINKS} links`);79 return;80 }8182 // 6. plain comments go live at once. links are what spam is for, so83 // a comment with one waits for approval. daniel's are always live84 const approved = isAuthor || links === 0;8586 const id = crypto.randomUUID();87 const shownName = isAuthor ? "daniel" : name;88 await env.DB89 .prepare(90 "INSERT INTO Comments (id, page, parent, name, body, is_author, approved, created_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?)"91 )92 .bind(id, page, parent, shownName, body, isAuthor ? 1 : 0, approved ? 1 : 0, new Date().toISOString())93 .run();9495 // 7. tell daniel about every comment, his own included, so each one96 // has a delete link. the comment is already saved, so a failure97 // here only logs98 try {99 const sig = await hmacHex(env.SOCIAL_SECRET, "moderate:" + id);100 const raw = notification({ page, id, name: shownName, body, approved, link: `${env.SITE_ORIGIN || SITE_URL}/api/moderate?id=${id}&sig=${sig}` });101 await env.NOTIFY.send(new EmailMessage(NOTIFY_FROM, AUTHOR, raw));102 } catch (err) {103 console.log("notify failed: " + (err?.message || err));104 }105 },106};107108// ===== checks =====109110// SITE_ORIGIN is for local testing only (.dev.vars): it points the page111// check and the moderation link at wrangler pages dev instead of the live site112async function pageExists(env, page) {113 try {114 const res = await fetch((env.SITE_ORIGIN || SITE_URL) + page, { method: "HEAD" });115 return res.status === 200;116 } catch {117 return false;118 }119}120121async function topLevelParent(env, id, page) {122 const row = await env.DB.prepare("SELECT page, parent FROM Comments WHERE id = ? AND approved = 1").bind(id).first();123 if (!row || row.page !== page) {124 return null;125 }126 return row.parent || id;127}128129// ===== text =====130131// plain text with quoted history and signatures cut off. a "name: ..."132// first line sets the display name (empty if missing).133// stored as plain text, escaped when the page is rendered134function cleanBody(email) {135 const text = (email.text?.trim() ? email.text : htmlToText(email.html || "")).replace(/\r\n?/g, "\n");136 const lines = text.split("\n");137138 let name = "";139 const kept = [];140 for (let i = 0; i < lines.length; i++) {141 const line = lines[i].trimEnd();142 const t = line.trim();143144 // where the previous message or a signature starts. gmail can wrap145 // "On <date> <name> wrote:" over two lines146 if (147 /^On\s.*wrote:$/.test(t) ||148 (/^On\s/.test(t) && /wrote:$/.test((lines[i + 1] || "").trim())) ||149 /^-{2,}\s*(original|forwarded) message/i.test(t) ||150 /^From:\s/.test(t) ||151 /^_{5,}$/.test(t) ||152 t === "--" ||153 /reply above this line/i.test(t) ||154 /^sent from my /i.test(t)155 ) {156 break;157 }158 if (t.startsWith(">")) {159 continue;160 }161 const nameLine = t.match(/^name:\s*(.*)$/i);162 if (nameLine && !name && !kept.some((k) => k.trim())) {163 name = nameLine[1];164 continue;165 }166 kept.push(line);167 }168169 name = name.replace(/[\x00-\x1f\x7f]/g, "").replace(/\s+/g, " ").trim().slice(0, MAX_NAME);170 const body = kept.join("\n").replace(/\n{3,}/g, "\n\n").trim();171 return { name, body };172}173174function htmlToText(html) {175 return html176 .replace(/<(script|style)[\s\S]*?<\/\1>/gi, "")177 .replace(/<br\s*\/?>/gi, "\n")178 .replace(/<\/(p|div|li|blockquote|h[1-6]|tr)>/gi, "\n")179 .replace(/<[^>]+>/g, "")180 .replace(/ /g, " ")181 .replace(/</g, "<")182 .replace(/>/g, ">")183 .replace(/"/g, "\"")184 .replace(/'/g, "'")185 .replace(/&/g, "&");186}187188// ===== notification =====189190// a minimal plain-text email, built by hand. its reply-to and subject make191// hitting reply post an answer under the comment. the marker line keeps the192// quoted notification (and its moderation link) out of that answer193function notification({ page, id, name, body, approved, link }) {194 const headers = [195 `From: ${NOTIFY_FROM}`,196 `To: ${AUTHOR}`,197 `Reply-To: reply@replies.danieldaum.net`,198 `Subject: re: ${SITE_URL}${page}#comment-${id}`,199 `Date: ${new Date().toUTCString().replace(/GMT$/, "+0000")}`,200 `Message-ID: <${crypto.randomUUID()}@replies.danieldaum.net>`,201 `MIME-Version: 1.0`,202 `Content-Type: text/plain; charset=utf-8`,203 `Content-Transfer-Encoding: 8bit`,204 ];205 const status = approved ? "It is live." : "It has a link, so it is waiting for approval.";206 const action = approved ? "Delete" : "Approve or delete";207 const text = [`## reply above this line to answer on the site ##`, ``, `${name} commented on ${page}:`, ``, body, ``, status, `${action}: ${link}`, ``].join("\n");208 return headers.join("\r\n") + "\r\n\r\n" + text.replace(/\n/g, "\r\n");209}
workers/comments/wrangler.tomldeleted
+0 −14
@@ -1,14 +0,0 @@1# keeps the old worker's name so its email routing rule still points here2name = "saturn-replies-inbound"3main = "src/index.js"4compatibility_date = "2026-09-01"5workers_dev = false67[[d1_databases]]8binding = "DB"9database_name = "saturn-social"10database_id = "2cc8bddd-d422-4d1e-8480-c1c75c8d02b0"1112[[send_email]]13name = "NOTIFY"14destination_address = "daniel@danieldaum.net"
wrangler.tomldeleted
+0 −8
@@ -1,8 +0,0 @@1name = "saturn"2pages_build_output_dir = "."3compatibility_date = "2026-09-01"45[[d1_databases]]6binding = "DB"7database_name = "saturn-social"8database_id = "2cc8bddd-d422-4d1e-8480-c1c75c8d02b0"