From 7bd85a96c1b1abd35f96a1f6bf05a09cff48f352 Mon Sep 17 00:00:00 2001 From: Justin Garrison Date: Fri, 30 Jan 2026 11:50:35 -0800 Subject: [PATCH] feat: add support for primary buttons in navbar Also add custom fonts if we want them Signed-off-by: Justin Garrison --- docs-gen/main.go | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/docs-gen/main.go b/docs-gen/main.go index 8d14a9e..f15168b 100644 --- a/docs-gen/main.go +++ b/docs-gen/main.go @@ -26,6 +26,7 @@ type Config struct { Contextual *Contextual `yaml:"contextual,omitempty"` Logo *Logo `yaml:"logo,omitempty"` Thumbnails *Thumbnails `yaml:"thumbnails,omitempty"` + Fonts *Fonts `yaml:"fonts,omitempty"` SEO *SEO `yaml:"seo,omitempty"` Search *Search `yaml:"search,omitempty"` Errors *Errors `yaml:"errors,omitempty"` @@ -62,8 +63,25 @@ type Thumbnails struct { Background string `yaml:"background,omitempty" json:"background,omitempty"` } +type Fonts struct { + Family string `yaml:"family,omitempty" json:"family,omitempty"` + Weight *int `yaml:"weight,omitempty" json:"weight,omitempty"` + Source string `yaml:"source,omitempty" json:"source,omitempty"` + Format string `yaml:"format,omitempty" json:"format,omitempty"` + Heading *FontStyle `yaml:"heading,omitempty" json:"heading,omitempty"` + Body *FontStyle `yaml:"body,omitempty" json:"body,omitempty"` +} + +type FontStyle struct { + Family string `yaml:"family,omitempty" json:"family,omitempty"` + Weight *int `yaml:"weight,omitempty" json:"weight,omitempty"` + Source string `yaml:"source,omitempty" json:"source,omitempty"` + Format string `yaml:"format,omitempty" json:"format,omitempty"` +} + type Navbar struct { - Links []NavLink `yaml:"links" json:"links"` + Links []NavLink `yaml:"links" json:"links"` + Primary *NavPrimary `yaml:"primary,omitempty" json:"primary,omitempty"` } type NavLink struct { @@ -71,6 +89,12 @@ type NavLink struct { Href string `yaml:"href" json:"href"` } +type NavPrimary struct { + Type string `yaml:"type" json:"type"` + Label string `yaml:"label" json:"label"` + Href string `yaml:"href" json:"href"` +} + type Footer struct { Socials map[string]string `yaml:"socials" json:"socials"` } @@ -181,6 +205,7 @@ type MintlifyConfig struct { Contextual *Contextual `json:"contextual,omitempty"` Logo *Logo `json:"logo,omitempty"` Thumbnails *Thumbnails `json:"thumbnails,omitempty"` + Fonts *Fonts `json:"fonts,omitempty"` SEO *SEO `json:"seo,omitempty"` Search *Search `json:"search,omitempty"` Errors *Errors `json:"errors,omitempty"` @@ -259,6 +284,7 @@ func main() { Contextual: mergedConfig.Contextual, Logo: mergedConfig.Logo, Thumbnails: mergedConfig.Thumbnails, + Fonts: mergedConfig.Fonts, SEO: mergedConfig.SEO, Search: mergedConfig.Search, Errors: mergedConfig.Errors,