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.
assetsstringWhether generated pages reference copied assets or embed supported assets.
enum=["local","inline"]; default="local"
base_pathstringNormalized public path prefix used by routes and canonical URLs.
default="/"; pattern="^(|/.*)$"
bindingsobjectNamed host binding declarations keyed by semantic provider kind.
custom_cssarrayAdditional local or approved HTTPS stylesheets.
default=[]
*css_urlstring*minLength=1
frameobjectLegacy frame presentation authority; mutually exclusive with layout and shell.
builtinstringcommandstringgo_moduleobjectconstructorstring*minLength=1
importstring*minLength=1
valuesobjectversionstring*minLength=1
protocolstringvaluesobject
layoutobject | object | objectTyped site layout and its closed kind-specific values.
defaultobjectcontentobjectlayoutvalueconst="article"
familiesarrayminItems=1; uniqueItems=true
navigationarrayshellbooleansidebarbooleantocboolean
kindvalueconst="article"
valuesobjectcontentobjectlayoutvalueconst="article"
familystringminLength=1
navigationarrayshellbooleansidebarbooleantocboolean
localesobjectdefaultstringCanonical BCP 47 default locale.
default="en"; pattern="^[A-Za-z]{2,8}(?:-[A-Za-z0-9]{1,8})*$"
supportedarrayUnique canonical BCP 47 locales; must include default.
minItems=1; uniqueItems=true
navigationobjectexcludearrayNormalized glob patterns omitted from generated navigation.
uniqueItems=true
modestringNavigation strategy for the configured site.
enum=["file-tree"]; default="file-tree"
offlinebooleanKeep the generated publication independent of network fetches.
default=true
outputstringNormalized relative directory receiving the published artifact tree.
default="dist"; minLength=1
shellobjectLegacy shell presentation authority; mutually exclusive with layout and frame.
builtinstringcommandstringgo_moduleobjectconstructorstring*minLength=1
importstring*minLength=1
valuesobjectversionstring*minLength=1
protocolstringvaluesobject
siteobject*base_urlstringOptional absolute HTTPS origin used for canonical URLs and feeds.
format="uri"; pattern="^https://"
descriptionstringPublic site description used in page and social metadata.
homestringMarkdown path below source used as the public home route.
default="index.md"; pattern="^(|.*\\.(md|markdown))$"
iconstring*Normalized local favicon or site icon path below the config directory.
minLength=1
logostring*Normalized local SVG logo path below the config directory.
minLength=1
namestring*Public site name.
minLength=1
repository_urlstringOptional absolute HTTPS source repository URL.
format="uri"; pattern="^https://"
social_imageobject*altstring*Non-empty alternative text for the social preview image.
minLength=1; maxLength=160
pathstring*Local JPEG or PNG social preview path; Margo validates a 1280x640 image.
minLength=1
versionstringOptional release or development label displayed by the site shell.
maxLength=64
sourcestring*Normalized relative directory containing Markdown sources.
minLength=1
themeobjectallow_switch_themebooleandefault=false
builtinbooleandefault=false
color_modestringenum=["system","light","dark"]; default="system"
namestringdefault="modern"; pattern="^[a-z][a-z0-9_-]{0,63}$"
themesarrayAdditional local or approved HTTPS theme entries.
default=[]
*css_urlstring*Normalized local stylesheet path or approved HTTPS stylesheet URL.
minLength=1
namestring*Lowercase theme identifier.
pattern="^[a-z][a-z0-9_-]{0,63}$"
token_catalogstring*Normalized local token catalog path.
minLength=1
versionvalue*Exact site configuration contract version.
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.