Site schema
#This schema describes the top-level site.yaml configuration used to build a
linked publication: source and output paths, identity, locales, navigation,
layouts, and theme settings.
Margo site configuration v1
Closed YAML/JSON configuration for a Margo documentation site.
asset_budget_bytesintegerAggregate budget for distinct source assets. Zero keeps 16 MiB. Individual source files remain capped at 16 MiB and social images at 8 MiB. Generated runtime artifacts and configured branding are excluded; process memory and final output need a separate host budget.
- Constraints
default=0; minimum=0; maximum=268435456
assetsstringWhether generated pages reference copied assets or embed supported assets.
- Constraints
enum=["local","inline"]; default="local"
base_pathstringNormalized public path prefix used by routes and canonical URLs.
- Constraints
default="/"; pattern="^(|/.*)$"
bindingsobjectNamed host binding declarations keyed by semantic provider kind.
custom_cssarrayAdditional local or approved HTTPS stylesheets.
- Constraints
default=[]
*css_urlstring required- Constraints
minLength=1
frameobjectLegacy frame presentation authority; mutually exclusive with layout and shell.
builtinstringcommandstringgo_moduleobjectconstructorstring required- Constraints
minLength=1
importstring required- Constraints
minLength=1
valuesobjectversionstring required- Constraints
minLength=1
protocolstringvaluesobject
layoutobject | object | objectTyped site layout and its closed kind-specific values.
defaultobjectcontentobjectlayoutvalue- Constraints
const="article"
familiesarray- Constraints
minItems=1; uniqueItems=true
navigationarraypaginationbooleanRender family-local previous and next links.
- Constraints
default=true
shellbooleansidebarbooleantocboolean
kindvalue- Constraints
const="article"
valuesobjectcontentobjectlayoutvalue- Constraints
const="article"
familystring- Constraints
minLength=1
navigationarraypaginationbooleanRender family-local previous and next links.
- Constraints
default=true
shellbooleansidebarbooleantocboolean
localesobjectdefaultstringCanonical BCP 47 default locale.
- Constraints
default="en"; pattern="^[A-Za-z]{2,8}(?:-[A-Za-z0-9]{1,8})*$"
selectorobjectVisible language controls; independent of canonical and hreflang metadata.
enabledbooleanShow language controls for available equivalents. Omission preserves existing behavior.
- Constraints
default=true
flagsobjectOptional decorative local flag images keyed by supported locale. Countries are explicit consumer choices, not inferred from language tags.
supportedarrayUnique canonical BCP 47 locales; must include default.
- Constraints
minItems=1; uniqueItems=true
navigationobjectexcludearrayNormalized glob patterns omitted from generated navigation.
- Constraints
uniqueItems=true
footer_linksarrayLinks appended to the native site footer. Root-relative URLs include base_path.
*hrefstring required- Constraints
minLength=1
labelstring required- Constraints
minLength=1
localestringOptional supported BCP 47 locale. Omit for a shared destination.
linksarrayGlobal docs-header destinations, independent of family navigation. Root-relative URLs include base_path.
*hrefstring required- Constraints
minLength=1
labelstring required- Constraints
minLength=1
localestringOptional supported BCP 47 locale. Omit for a shared destination.
modestringNavigation strategy for the configured site.
- Constraints
enum=["file-tree"]; default="file-tree"
offlinebooleanKeep the generated publication independent of network fetches.
- Constraints
default=true
outputstringNormalized relative directory receiving the published artifact tree.
- Constraints
default="dist"; minLength=1
publicationobjectVisible publication metadata formatting. Machine timestamps retain their original timezone and precision.
date_formatstringOptional Go time layout for visible dates. Omission preserves RFC 3339 text. Month and weekday names follow Go's English time formatting.
- Constraints
minLength=1; maxLength=128
searchobjectempty_textstring- Constraints
minLength=1
labelstring- Constraints
minLength=1
placeholderstring- Constraints
minLength=1
shellobjectLegacy shell presentation authority; mutually exclusive with layout and frame.
builtinstringcommandstringgo_moduleobjectconstructorstring required- Constraints
minLength=1
importstring required- Constraints
minLength=1
valuesobjectversionstring required- Constraints
minLength=1
protocolstringvaluesobject
siteobject requiredapplication_namestringApplication name for browser and Apple mobile metadata.
- Constraints
minLength=1; maxLength=256
base_urlstringOptional absolute HTTPS origin used for canonical URLs and feeds.
- Constraints
format="uri"; pattern="^https://"
descriptionstringPublic site description used in page and social metadata.
hide_namebooleanHide visible docs-header site name beside a wordmark, retaining its accessible name.
- Constraints
default=false
homestringMarkdown path below source used as the public home route.
- Constraints
default="index.md"; pattern="^(|.*\\.(md|markdown))$"
iconstring requiredNormalized local favicon or site icon path below the config directory.
- Constraints
minLength=1
iconsarrayAdditional PNG, safe SVG or ICO browser icons, or PNG Apple Touch icons. Replaces the default icon link when the same path is declared with rel icon.
- Constraints
maxItems=32
*pathstring required- Constraints
minLength=1
relstring- Constraints
enum=["icon","shortcut icon","apple-touch-icon"]; default="icon"
sizesstring- Constraints
pattern="^(any|[1-9][0-9]{0,3}x[1-9][0-9]{0,3}( [1-9][0-9]{0,3}x[1-9][0-9]{0,3})*)$"
logostring requiredNormalized local SVG logo path below the config directory.
- Constraints
minLength=1
logo_darkstringOptional local SVG logo for dark mode in the docs shell.
- Constraints
minLength=1
namestring requiredPublic site name.
- Constraints
minLength=1
repository_urlstringOptional absolute HTTPS source repository URL.
- Constraints
format="uri"; pattern="^https://"
social_imageobject requiredaltstring requiredNon-empty alternative text for the social preview image.
- Constraints
minLength=1; maxLength=160
pathstring requiredLocal JPEG or PNG social preview path; Margo preserves decoded image dimensions.
- Constraints
minLength=1
theme_colorstringBrowser theme color as a six-digit hexadecimal color.
- Constraints
pattern="^#[0-9a-fA-F]{6}$"
versionstringOptional release or development label displayed by the site shell.
- Constraints
maxLength=64
webmanifeststringLocal webmanifest JSON object, up to 64 KiB, copied unchanged. Paths inside it remain consumer-owned and relative to its published location.
- Constraints
minLength=1
sourcestring requiredNormalized relative directory containing Markdown sources.
- Constraints
minLength=1
themeobjectallow_switch_themeboolean- Constraints
default=false
builtinboolean- Constraints
default=false
color_modestring- Constraints
enum=["system","light","dark"]; default="system"
namestring- Constraints
default="modern"; pattern="^[a-z][a-z0-9_-]{0,63}$"
themesarrayAdditional local or approved HTTPS theme entries.
- Constraints
default=[]
*css_urlstring requiredNormalized local stylesheet path or approved HTTPS stylesheet URL.
- Constraints
minLength=1
namestring requiredLowercase theme identifier.
- Constraints
pattern="^[a-z][a-z0-9_-]{0,63}$"
token_catalogstring requiredNormalized local token catalog path.
- Constraints
minLength=1
versionvalue requiredExact site configuration contract version.
- Constraints
const=1
Used by
margo siteandmargo serve.- YAML language-server and editor associations for
site.yaml. margo schema site, which emits the exact embedded bytes.