From: Cameron Otsuka Date: Wed, 26 Aug 2026 00:20:42 +0000 (-0700) Subject: cold install faster than cache, svgs skip image processing X-Git-Url: https://git.otsuka.systems/?a=commitdiff_plain;h=4f8e83e1f670513e050abd48adb951959f5ae9fc;p=cotsuka.github.io cold install faster than cache, svgs skip image processing --- diff --git a/.github/workflows/deploy-to-ghpages.yml b/.github/workflows/deploy-to-ghpages.yml index f33e408..784fafa 100644 --- a/.github/workflows/deploy-to-ghpages.yml +++ b/.github/workflows/deploy-to-ghpages.yml @@ -24,10 +24,9 @@ jobs: - uses: actions/checkout@v7 - uses: oven-sh/setup-bun@v2 - name: Cache dependencies and build artifacts - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | - ~/.bun/install/cache node_modules/.astro key: ${{ runner.os }}-${{ hashFiles('bun.lock') }}-${{ hashFiles('public/**/*.{jpg,jpeg,png,webp,avif,svg,gif}', 'content/**/*.{jpg,jpeg,png,webp,avif,svg,gif}', 'src/assets/**/*.{jpg,jpeg,png,webp,avif,svg,gif,ico}') }} restore-keys: | diff --git a/astro.config.mjs b/astro.config.mjs index 7131cc0..429b457 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -72,7 +72,6 @@ export default defineConfig({ avif: { quality: 50, effort: 2 }, }, }, - dangerouslyProcessSVG: true, }, vite: { build: { diff --git a/content/articles/r1-vs-o1-ai-as-commodity-or-moat/index.mdx b/content/articles/r1-vs-o1-ai-as-commodity-or-moat/index.mdx index 0af55f4..4063aa6 100644 --- a/content/articles/r1-vs-o1-ai-as-commodity-or-moat/index.mdx +++ b/content/articles/r1-vs-o1-ai-as-commodity-or-moat/index.mdx @@ -56,11 +56,7 @@ Despite less capital expenditure, R1 has comparable performance to o1 due to sev This is incredible for the little guy: run your own model, privately, without the need for massive infrastructure. -
+
A distilled version of R1 running locally on an iPhone. Source: [@localghost](https://x.com/localghost/status/1882109711732154387).
diff --git a/src/components/ui/figure.astro b/src/components/ui/figure.astro index 3b5c6fe..3bcb479 100644 --- a/src/components/ui/figure.astro +++ b/src/components/ui/figure.astro @@ -7,19 +7,40 @@ interface Props { alt: string; formats?: string[]; layout?: 'constrained' | 'full-width' | 'fixed' | 'none'; + /** Serve the image as-is (no variants). Required for animated images + * and recommended for SVGs, which are already resolution-independent. */ + plain?: boolean; } -const { image, alt, formats = ['webp'], layout } = Astro.props; +const { image, alt, formats = ['webp'], layout, plain = false } = Astro.props; + +// SVGs are vector-based: generating per-breakpoint raster-style copies +// multiplies the shipped bytes with no visual gain. Animated images +// cannot be resized by the image service and balloon into huge +// lossless fallbacks. Both are served as-is. +const isSvg = image.src?.endsWith('.svg'); +const serveAsIs = plain || isSvg; ---
- + { + serveAsIs ? ( + {alt} + ) : ( + + ) + }