stencila.toml[site]
/docs/config/site/
Where configuration lives
stencila.toml
[site]
title = "My Documentation"
root = "docs"as a simple value for the common case, or as a table when you need more control.
[site]
search = true[site.search]
enabled = true
exclude-routes = ["/api/**"][site]
A gentle starting point
[site]
title = "My Project Docs"
root = "docs"branding : title, author, logo, icons, social links structure : navigation, labels, descriptions, featured content publishing rules : routes, access, exclude patterns, output formats layout : headers, sidebars, footers, search, and responsive behavior interactivity : reviews, uploads, remotes, actions, and glide navigation
[site]
title = "Acme Docs"
domain = "docs.acme.org"
author = "Acme Inc"
root = "docs"
search = true
reviews = true
[site.logo]
default = "logo.svg"
dark = "logo-dark.svg"
alt = "Acme"
[site.socials]
github = "acme/docs"
discord = "acme-community"
[site.labels]
api = "API"
cli = "CLI"
[site.layout]
preset = "docs"Top-level fields
[site]
domain | docs.example.org | |
title | ||
author | ||
logo | ||
root | ||
exclude | ||
search | ||
sitemap | ||
reviews | ||
uploads | ||
remotes | ||
formats |
Branding and identity
domain
domaindomain
[site]
domain = "docs.example.org"title
titletitle
[site]
title = "Project Atlas"title
author
authorauthor
[site]
author = "Acme Inc"[site.author]
type = "Organization"
name = "Acme Inc"
url = "https://acme.com"logo
logologo
[site]
logo = "logo.svg"[site.logo]
default = "logo.svg"
dark = "logo-dark.svg"
mobile = "logo-mobile.svg"
dark-mobile = "logo-mobile-dark.svg"
link = "/"
alt = "Acme"defaultmobiletabletdarkdark-mobiledark-tabletlinkalt
darkmobiledefault
Navigation metadata
[site.icons]
[site.icons]full route, such as "/docs/config/"route without leading and trailing slashes, such as "docs/config"label, such as "Features"bare segment, such as config
[site.icons]
"/" = "home"
docs = "book"
"Features" = "sparkles""banana""lucide:banana"
[site.labels]
[site.labels][site.labels]
cli = "CLI"
api = "API"
"/docs/db/" = "Database"[site.descriptions]
[site.descriptions]nav-menu
[site.descriptions]
"docs/getting-started" = "Quick start guide"
docs = "Documentation and guides"[site.socials]
[site.socials]social-links
[site.socials]
github = "org/repo"
discord = "invite-code"
x = "handle"bluesky = "handle.bsky.social"discord = "invite"facebook = "page"github = "org"or "org/repo"gitlab = "org"or "org/repo"instagram = "handle"linkedin = "in/name"or "company/name"mastodon = "https://..."for a full URL reddit = "r/sub"or "u/user"twitch = "channel"x = "handle"or twitter = "handle"youtube = "@channel"
xtwitterx
[site.featured.<key>]
[site.featured.<key>][site.featured.docs]
badge = "New"
icon = "rocket"
title = "Quick Start Guide"
description = "Get up and running in minutes"
cta = { label = "Get Started", route = "/docs/getting-started/" }titlebadgeiconimagedescriptioncta
iconimage
Navigation structure
nav
navnavnav
# 1. Route shorthand
nav = ["/", "/docs/", "/about/"]
# 2. Link with explicit label
nav = [
{ label = "Home", route = "/" },
{ label = "Docs", route = "/docs/" },
]
# 3. Group with children
nav = [
"/",
{ label = "Docs", children = [
"/docs/getting-started/",
"/docs/configuration/",
]},
{ label = "Guides", route = "/guides/", children = [
"/guides/deployment/",
]},
]idfor a stable identifier labelfor display text routefor the internal URL childrenfor groups iconand descriptionfor richer presentation section-titlefor grouped dropdown layouts
/
Content scope and publishing rules
root
rootroot
[site]
root = "docs"root = "docs"docs/guide.md/guide//docs/guide/
exclude
excludeexclude
[site]
exclude = ["**/*.draft.md", "_drafts/**"]root
formats
formatsformats
[site]
formats = ["md"][site.access]
[site.access][site.access]
default = "public"
"/data/" = "password"
"/internal/" = "team"publicsubscriberpasswordteam
/
[site.routes]
[site.routes][site.routes]
"/" = "index.md"
"/about/" = "README.md"
"/old-page/" = { redirect = "/new-page/", status = 301 }
"/{region}/" = { file = "report.smd", arguments = { region = ["north", "south"] } }choosing a specific file for /adding redirects from old URLs to new ones generating multiple routes from a single templated source document
301302303307308gridzip{tag}{branch}{i}
Layout and page structure
[site.layout]
[site.layout]docs
Presets
docs | |
blog | |
landing | |
api |
docsbloglandingmain.width = "none"main.padding = "none"main.title = false
[site.layout]
preset = "docs"Regions
header | |
left-sidebar | |
top | |
bottom | |
right-sidebar | |
footer |
startmiddleendrowsstartmiddleend
false
Built-in components
logotitlebreadcrumbsnav-treenav-menunav-groupstoc-treeprev-nextcolor-modecopyrightsocial-linksedit-sourceedit-on:gdocsedit-on:m365copy-markdownsite-searchsite-review
edit-on
Main content area
[site.layout.main]
[site.layout.main]
width = "none"
padding = "none"
title = falseRoute-specific overrides
[[site.layout.overrides]]
routes = ["/blog/**"]
preset = "blog"
left-sidebar = false
[[site.layout.overrides]]
routes = ["/"]
preset = "landing"false
Named components
[site.layout.components]
[site.layout.components.nav-tree]
collapsible = true
depth = 3
[site.layout.components.main-nav]
type = "nav-tree"
collapsible = truetype[site.layout.components]
Responsive behavior
[site.layout.responsive]
[site.layout.responsive]
breakpoint = 1024
toggle-style = "fixed-edge"fixed-edgeheaderhamburger
Example layout
[site.layout]
preset = "docs"
[site.layout.header]
start = "logo"
middle = "nav-menu"
end = ["site-search", "color-mode"]
[site.layout.left-sidebar]
start = { type = "nav-tree", collapsible = true, depth = 3 }
[site.layout.bottom]
middle = "prev-next"
[site.layout.footer]
start = "nav-groups"
middle = "copyright"
end = "social-links"Navigation behavior and search
[site.glide]
[site.glide][site.glide]
enabled = true
prefetch = 25
cache = 10[site.search]
[site.search]# Simple form
[site]
search = true
# Detailed form
[site.search]
enabled = true
include-types = ["Heading", "Paragraph", "Datatable"]
exclude-routes = ["/api/**", "/internal/**"]
max-text-length = 500
fuzzy = trueinclude-types
HeadingParagraphDatatableCodeChunkFigureTable
[site.sitemap]
[site.sitemap]# Simple form
[site]
sitemap = true
# Detailed form
[site.sitemap]
enabled = true
formats = ["xml", "txt"]
visibility = "public-only"
exclude-routes = ["/drafts/**", "/internal/**"]
include-lastmod = truexml
formats: generate xml, txt, or both visibility: choose public-onlyor allexclude-routes: omit matching routes from sitemap output include-lastmod: include last-modified timestamps where available
public-onlyincludes only public routes and excludes the specimen page allalso includes restricted routes and the specimen page txtproduces a plain text sitemap, while xmlproduces the standard XML sitemap format used by most crawlers
Reader interactions and contribution flows
workspace.id
workspace.id
[site.reviews]
[site.reviews]# Simple form
[site]
reviews = true
# Detailed form
[site.reviews]
enabled = true
public = true
anon = false
types = ["comment", "suggestion"]
min-selection = 10
max-selection = 5000
shortcuts = false
include = ["docs/**"]
exclude = ["api/**"]includeexcludespread-routes
[site.uploads]
[site.uploads]# Simple form
[site]
uploads = true
# Detailed form
[site.uploads]
enabled = true
public = false
anon = false
path = "data"
include = ["data/**"]
exclude = ["api/**"]
extensions = ["csv", "json", "xlsx"]
spread-routes = false[site.remotes]
[site.remotes]# Simple form
[site]
remotes = true
# Detailed form
[site.remotes]
enabled = true
path = "content"
default-format = "smd"
allowed-formats = ["smd", "md"]
default-sync-direction = "bi"
public = false
anon = false
user-path = true
require-message = false
include = ["docs/**"]
exclude = ["api/**"][site.actions]
[site.actions][site.actions]
position = "bottom-right"
direction = "vertical"
mode = "collapsed"positionbottom-rightbottom-lefttop-righttop-leftdirectionverticalhorizontalmodecollapsedexpanded
Automatic index pages
[site.auto-index]
[site.auto-index]# Simple form
[site]
auto-index = true
# Detailed form
[site.auto-index]
enabled = true
exclude = ["/api/**", "/internal/**"]Specimen page
[site.specimen]
[site.specimen][site.specimen.layout]
preset = "docs"
[site.specimen.layout.header]
start = "logo"
end = ["color-mode"][site.layout]
How to choose what to configure
set title, root, and domainchoose layout.preset = "docs"enable search = trueadd logo, socials, and any custom labelsdefine navonly if the automatic structure is not enough add reviews, uploads, or remotesonly if you need contribution flows