Commit cd35939
feat(infra): add Netlify Image CDN and reduce web requests
Integrate @astrojs/netlify adapter with imageCDN enabled so all raster
images are optimized at the edge (AVIF/WebP format negotiation, resizing)
instead of at build time — zero code changes needed across existing
<Image> and getImage() usage.
Add robots.txt to block aggressive AI scrapers (GPTBot, Bytespider,
SemrushBot, etc.) and set crawl delays for legitimate search engines.
Add Cache-Control headers for HTML pages (1h TTL + stale-while-revalidate)
so repeat visits are served from Netlify's CDN edge cache.
Defer below-fold video components from client:load to client:visible so
their JS chunks only load when scrolled into view, reducing initial
requests per page — especially for bots that don't scroll.
- astro.config.mjs: add netlify() adapter, image.domains, remove dead
vite.build.assets config
- netlify.toml: replace broken image redirect rules with [images] config
- public/robots.txt: block AI scrapers, crawl-delay for search engines
- public/_headers: add HTML page caching with stale-while-revalidate
- Audiodotcom.astro: remove format:"webp" (let CDN auto-negotiate),
switch FeaturedVideo to client:visible
- ReleaseVideo.astro: switch SplitFeaturedVideo x2 to client:visible
- package.json: add @astrojs/netlify, remove unused @fontsource/twinkle-star
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 85d8f88 commit cd35939
16 files changed
Lines changed: 16560 additions & 175 deletions
File tree
- .github/workflows
- public
- fonts
- src
- components
- form
- homepage
- pages
- styles
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
| 4 | + | |
9 | 5 | | |
10 | | - | |
| 6 | + | |
11 | 7 | | |
12 | 8 | | |
13 | 9 | | |
| |||
23 | 19 | | |
24 | 20 | | |
25 | 21 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
31 | 25 | | |
32 | 26 | | |
33 | 27 | | |
| |||
38 | 32 | | |
39 | 33 | | |
40 | 34 | | |
41 | | - | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | | - | |
8 | | - | |
9 | 6 | | |
| 7 | + | |
10 | 8 | | |
11 | | - | |
12 | 9 | | |
13 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | 40 | | |
43 | 41 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
0 commit comments