Skip to content

docs: move assets to public#3876

Merged
mrlubos merged 1 commit into
mainfrom
docs/pass-4
May 14, 2026
Merged

docs: move assets to public#3876
mrlubos merged 1 commit into
mainfrom
docs/pass-4

Conversation

@mrlubos
Copy link
Copy Markdown
Member

@mrlubos mrlubos commented May 14, 2026

No description provided.

@bolt-new-by-stackblitz
Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@mrlubos mrlubos marked this pull request as ready for review May 14, 2026 04:37
@vercel
Copy link
Copy Markdown

vercel Bot commented May 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
web Building Building Preview, Comment May 14, 2026 4:37am

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 14, 2026

⚠️ No Changeset found

Latest commit: 5de07fd

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. docs 📃 Documentation updates. labels May 14, 2026
@mrlubos mrlubos merged commit 36ed12b into main May 14, 2026
2 of 3 checks passed
@mrlubos mrlubos deleted the docs/pass-4 branch May 14, 2026 04:37
Copy link
Copy Markdown
Contributor

@pullfrog pullfrog Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

The generate-images Vite plugin still reads source images from web/src/assets/raw/, which this PR empties. Every web build will hit Error: Input file is missing from sharp for all 6 sources, the error is swallowed by the plugin's try/catch, and the resized outputs under web/public/assets/.gen/ will silently fail to regenerate.

TL;DR — Relocates 20 brand/raw image assets from web/src/assets/ to web/public/assets/ so the URLs referenced by the published READMEs (https://heyapi.dev/assets/<vendor>/..., https://heyapi.dev/assets/raw/logo.png) and the various example apps resolve to the literal files served from Astro's public/. Net intent is correct — files in src/assets/ are processed and hashed by Astro/Vite and are not reachable at their source path, while public/ is served verbatim.

Key changes

  • Move 20 brand and raw assets into public/ — sponsor logos under cella/, fastapi/, kinde/, mintlify/, opencode/, scalar/, and the raw/ images (hero.png, kinde-logo-wordmark{,-dark}.png, logo-astronaut.png, logo.png, logo.svg, openapi-ts-hero.png, stainless-logo-wordmark.png) now live under web/public/assets/... so external links from READMEs and examples resolve correctly.

Summary | 20 files | 1 commit | base: maindocs/pass-4


Image-pipeline source path is now stale

Before: processImages() read each entry from src/assets/raw/<source> where the files existed.
After: the files are at public/assets/raw/<source>, but the plugin still reads from src/assets/raw/<source>.

web/plugins/generate-images.ts:123 builds the input path as path.join('src', 'assets', 'raw', image.source). After this PR none of hero.png, kinde-logo-wordmark.png, kinde-logo-wordmark-dark.png, logo-astronaut.png, openapi-ts-hero.png, or stainless-logo-wordmark.png exist at that path, so every sharp(inputPath)…toFile(...) call will throw. The try/catch in generateImagesPlugin.buildStart swallows the error after a single console.error, so the build continues but the resized outputs under web/public/assets/.gen/ are not regenerated. Suggested fix: change line 123 to path.join('public', 'assets', 'raw', image.source).

Why is this not caught by the build? The plugin wraps `processImages()` in a `try/catch` that logs once and returns. `sharp` fails on the first missing input, the catch absorbs it, and Astro/Vite never see a non-zero exit. Whatever resized images were committed previously (or cached in `.gen/`) keep working until they go stale or are deleted.

web/plugins/generate-images.ts

Pullfrog  | Fix it ➔View workflow run | Using Claude Opus𝕏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs 📃 Documentation updates. size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant