Skip to content

Commit 31a495c

Browse files
authored
Merge pull request #61 from rothgar/og-background
feat: add support for more docs.json fields
2 parents 47ee86c + f407a79 commit 31a495c

File tree

4 files changed

+45
-0
lines changed

4 files changed

+45
-0
lines changed

common.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ logo:
2424
light: "/images/sidero-light.svg"
2525
dark: "/images/sidero-dark.svg"
2626

27+
thumbnails:
28+
background: "/images/og-background.png"
29+
2730
navbar:
2831
links:
2932
- label: "Support"

docs-gen/main.go

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,16 @@ type Config struct {
1919
Schema string `yaml:"schema"`
2020
Theme string `yaml:"theme"`
2121
Name string `yaml:"name"`
22+
Description string `yaml:"description,omitempty"`
2223
Colors Colors `yaml:"colors"`
2324
Favicon string `yaml:"favicon"`
2425
Banner *Banner `yaml:"banner,omitempty"`
2526
Contextual *Contextual `yaml:"contextual,omitempty"`
2627
Logo *Logo `yaml:"logo,omitempty"`
28+
Thumbnails *Thumbnails `yaml:"thumbnails,omitempty"`
29+
SEO *SEO `yaml:"seo,omitempty"`
30+
Search *Search `yaml:"search,omitempty"`
31+
Errors *Errors `yaml:"errors,omitempty"`
2732
Navbar *Navbar `yaml:"navbar,omitempty"`
2833
Footer *Footer `yaml:"footer,omitempty"`
2934
Integrations *Integrations `yaml:"integrations,omitempty"`
@@ -52,6 +57,11 @@ type Logo struct {
5257
Dark string `yaml:"dark" json:"dark"`
5358
}
5459

60+
type Thumbnails struct {
61+
Appearance string `yaml:"appearance,omitempty" json:"appearance,omitempty"`
62+
Background string `yaml:"background,omitempty" json:"background,omitempty"`
63+
}
64+
5565
type Navbar struct {
5666
Links []NavLink `yaml:"links" json:"links"`
5767
}
@@ -73,6 +83,25 @@ type GA4Integration struct {
7383
MeasurementId string `yaml:"measurementId" json:"measurementId"`
7484
}
7585

86+
type SEO struct {
87+
Metatags map[string]string `yaml:"metatags,omitempty" json:"metatags,omitempty"`
88+
Indexing string `yaml:"indexing,omitempty" json:"indexing,omitempty"`
89+
}
90+
91+
type Search struct {
92+
Prompt string `yaml:"prompt,omitempty" json:"prompt,omitempty"`
93+
}
94+
95+
type Errors struct {
96+
Error404 *Error404 `yaml:"404,omitempty" json:"404,omitempty"`
97+
}
98+
99+
type Error404 struct {
100+
Redirect *bool `yaml:"redirect,omitempty" json:"redirect,omitempty"`
101+
Title string `yaml:"title,omitempty" json:"title,omitempty"`
102+
Description string `yaml:"description,omitempty" json:"description,omitempty"`
103+
}
104+
76105
type NavigationConfig struct {
77106
Version string `yaml:"version,omitempty"`
78107
Tabs []TabConfig `yaml:"tabs"`
@@ -139,11 +168,16 @@ type MintlifyConfig struct {
139168
Schema string `json:"$schema"`
140169
Theme string `json:"theme"`
141170
Name string `json:"name"`
171+
Description string `json:"description,omitempty"`
142172
Colors Colors `json:"colors"`
143173
Favicon string `json:"favicon"`
144174
Banner *Banner `json:"banner,omitempty"`
145175
Contextual *Contextual `json:"contextual,omitempty"`
146176
Logo *Logo `json:"logo,omitempty"`
177+
Thumbnails *Thumbnails `json:"thumbnails,omitempty"`
178+
SEO *SEO `json:"seo,omitempty"`
179+
Search *Search `json:"search,omitempty"`
180+
Errors *Errors `json:"errors,omitempty"`
147181
Navbar *Navbar `json:"navbar,omitempty"`
148182
Footer *Footer `json:"footer,omitempty"`
149183
Integrations *Integrations `json:"integrations,omitempty"`
@@ -209,11 +243,16 @@ func main() {
209243
Schema: mergedConfig.Schema,
210244
Theme: mergedConfig.Theme,
211245
Name: mergedConfig.Name,
246+
Description: mergedConfig.Description,
212247
Colors: mergedConfig.Colors,
213248
Favicon: mergedConfig.Favicon,
214249
Banner: mergedConfig.Banner,
215250
Contextual: mergedConfig.Contextual,
216251
Logo: mergedConfig.Logo,
252+
Thumbnails: mergedConfig.Thumbnails,
253+
SEO: mergedConfig.SEO,
254+
Search: mergedConfig.Search,
255+
Errors: mergedConfig.Errors,
217256
Navbar: mergedConfig.Navbar,
218257
Footer: mergedConfig.Footer,
219258
Integrations: mergedConfig.Integrations,

public/docs.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
"light": "/images/sidero-light.svg",
2525
"dark": "/images/sidero-dark.svg"
2626
},
27+
"thumbnails": {
28+
"background": "/images/og-background.png"
29+
},
2730
"navbar": {
2831
"links": [
2932
{

public/images/og-background.png

-46.3 KB
Loading

0 commit comments

Comments
 (0)