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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user