2
0

feat(pages): add blog section support to landing page templates

Add blog section configuration and rendering to landing pages. Includes:
- New BlogSectionConfig with headline, max posts, and excerpt options
- Logo source selection (URL, repo avatar, or org avatar)
- Recent blog posts display with featured images
- Navigation links to blog section
- Absolute repo URLs for custom domain support
This commit is contained in:
2026-03-07 10:34:51 -05:00
parent b7d8fcc719
commit 238f0974d8
6 changed files with 268 additions and 51 deletions

View File

@@ -44,6 +44,9 @@ type LandingConfig struct {
// CTA section
CTASection CTASectionConfig `yaml:"cta_section,omitempty"`
// Blog section
Blog BlogSectionConfig `yaml:"blog,omitempty"`
// Footer
Footer FooterConfig `yaml:"footer,omitempty"`
@@ -62,9 +65,10 @@ type LandingConfig struct {
// BrandConfig represents brand/identity settings
type BrandConfig struct {
Name string `yaml:"name,omitempty"`
LogoURL string `yaml:"logo_url,omitempty"`
Tagline string `yaml:"tagline,omitempty"`
Name string `yaml:"name,omitempty"`
LogoURL string `yaml:"logo_url,omitempty"`
LogoSource string `yaml:"logo_source,omitempty"` // "url" (default), "repo", or "org" — selects avatar source
Tagline string `yaml:"tagline,omitempty"`
}
// HeroConfig represents hero section settings
@@ -145,6 +149,16 @@ type CTASectionConfig struct {
Button CTAButton `yaml:"button,omitempty"`
}
// BlogSectionConfig represents blog section settings on the landing page
type BlogSectionConfig struct {
Enabled bool `yaml:"enabled,omitempty"`
Headline string `yaml:"headline,omitempty"`
Subheadline string `yaml:"subheadline,omitempty"`
MaxPosts int `yaml:"max_posts,omitempty"` // default 3
ShowExcerpt bool `yaml:"show_excerpt,omitempty"` // show subtitle as excerpt
CTAButton CTAButton `yaml:"cta_button,omitempty"` // "View All Posts" link
}
// FooterConfig represents footer settings
type FooterConfig struct {
Links []FooterLink `yaml:"links,omitempty"`