From d50f1925f100af44a26c92aceb32051136cb0eb6 Mon Sep 17 00:00:00 2001 From: Chad Miller Date: Thu, 13 Aug 2026 21:41:14 -0700 Subject: [PATCH] feat(release): the project mark on the artifacts page The mark from the pdsjs.dev site, inlined into the generated page and published as logo.svg for the favicon. The letters are outlines, so the mark does not depend on the viewer's fonts. The CSS approximation goes. Co-Authored-By: Claude Fable 5 --- scripts/pds-logo.svg | 5 +++++ scripts/publish-worker-artifact.mjs | 18 ++++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 scripts/pds-logo.svg diff --git a/scripts/pds-logo.svg b/scripts/pds-logo.svg new file mode 100644 index 0000000..67c4372 --- /dev/null +++ b/scripts/pds-logo.svg @@ -0,0 +1,5 @@ + +pds.js + + + diff --git a/scripts/publish-worker-artifact.mjs b/scripts/publish-worker-artifact.mjs index b3458e8..196bd59 100644 --- a/scripts/publish-worker-artifact.mjs +++ b/scripts/publish-worker-artifact.mjs @@ -132,16 +132,25 @@ function formatSize(bytes) { return `${(bytes / 1024 / 1024).toFixed(1)} MB`; } +// The project mark, inlined for the header and published as a file for the +// favicon. The letters are outlines, so the mark does not depend on the +// viewer's fonts. +const logoSvg = readFileSync(join(repoRoot, 'scripts', 'pds-logo.svg'), 'utf8'); +const logoInline = logoSvg.replace( + 'width="630" height="630"', + 'width="48" height="48"', +); + const indexHtml = ` pds.js worker artifacts + -pds +${logoInline}

Cloudflare worker artifacts

@@ -185,6 +194,10 @@ const releasesBlob = await uploadBlob( new TextEncoder().encode(JSON.stringify(releases, null, 2)), 'application/json', ); +const logoBlob = await uploadBlob( + new TextEncoder().encode(logoSvg), + 'image/svg+xml', +); const IMMUTABLE = 'public, max-age=31536000, immutable'; const SHORT = 'public, max-age=300'; @@ -199,6 +212,7 @@ const entries = [ { path: 'latest/manifest.json', blob: manifestBlob, cacheControl: SHORT }, { path: 'index.html', blob: indexBlob, cacheControl: SHORT }, { path: 'releases.json', blob: releasesBlob, cacheControl: SHORT }, + { path: 'logo.svg', blob: logoBlob, cacheControl: SHORT }, ]; const replaced = new Set(entries.map((e) => e.path)); const files = [ -- 2.51.2
versionpublishedsize