Take the article page color from the section banner SVG so the body cannot drift from the hero on current or future posts.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
adilallo
2026-08-19 16:31:10 -06:00
co-authored by Cursor
parent 1a014f30f0
commit 0f16c559c4
5 changed files with 133 additions and 4 deletions
+8 -3
View File
@@ -64,7 +64,7 @@ background:
- **related**: Array of article slugs (use filename without .md)
- **thumbnail**: Custom images for article thumbnails (optional)
- **banner.horizontal**: Section banner for md+ breakpoints (optional; defaults to `{slug}-section.svg`)
- **background.color**: Page background color as a hex code (e.g., `#F4F3F1`)
- **background.color**: Fallback page color when there is no `{slug}-section.svg`. If that banner exists, the page uses its 1920×672 rect fill so the body cannot drift from the hero.
### Related Articles
@@ -107,11 +107,16 @@ If you omit custom SVGs, the site reuses assets from an existing catalog article
## Background Color
Set the content page background using a hex color in frontmatter:
The article page background is the fill of the 1920×672 rect in
`public/content/blog/{slug}-section.svg` (the md+ ContentBanner). That keeps
the body the same color as the hero without a second hex to maintain.
`background.color` in frontmatter is only used when that section SVG is
missing:
```yaml
background:
color: "#F4F3F1" # Use any valid hex code
color: "#F4F3F1" # Fallback when there is no {slug}-section.svg
```
## File Naming