Configuration
Bark splits configuration into two files:
appsettings.json: host-level concerns, where the docs folder lives, whether hot reload is on, theme colors. Applied per deployment, and requires an app restart to take effect.docs/config.json: content-level concerns, site title and metadata, brand text, navigation, footer, social links. Set per project and hot-reloaded alongside your Markdown. No restart needed.
That split means a content editor never needs deploy access just to fix a typo in the brand name. This page walks through what you'll touch first. For the full field-by-field list, see Site Config.
If you are running Bark in Docker or a container environment, please see Environment Variables for the equivalent variable names.
appsettings.json
These settings belong to the Docs section of your appsettings.json:
| Setting | Default | Description |
|---|---|---|
RootPath |
docs |
Path to the Markdown files directory, relative to the app's working directory. |
DefaultPage |
index |
Page served at /. |
EnableHotReload |
true |
Watch *.md and config.json for changes and rebuild in the background. |
BasePath |
null |
Prefix for every internal link and asset URL. Set this when Bark is served from a subpath instead of the domain root. |
{
"Docs": {
"RootPath": "../../docs",
"DefaultPage": "index",
"EnableHotReload": true,
"BasePath": "/your-repo"
}
}TIP
BasePath matters most for static export, where a --base-path CLI flag usually replaces this setting entirely. Set it in appsettings.json instead when you're running the live server behind a reverse proxy that mounts Bark under a subpath.
Want to change colors, fonts, or ship your own CSS/JS? That's a separate concern from the settings above, covered in Extending Themes.
docs/config.json
This file covers everything from your site's title and HTML metadata to navigation, footer, and social links. The section below focuses on the navigation options since they have the most moving parts. For a full field-by-field list, including title, description, lang, and custom head tags, see Site Config.
You get three levels of control over navigation, and you can mix them:
- Do nothing. No
nav,sidebar, ortopNavinconfig.json: Bark builds the left sidebar from your folder structure automatically. - One flat sidebar (
nav) for the whole site. Good for small doc sets that don't need a header bar. - A header nav with dropdowns (
topNav) plus a different sidebar per section (sidebar, keyed by path prefix). This is the setup most multi-section docs sites want.
{
"brand": "Bark",
"topNav": [
{ "text": "Home", "link": "/" },
{ "text": "Guide", "link": "/getting-started/getting-started" },
{ "text": "Reference", "link": "/reference/site-config" },
{
"text": "More",
"items": [
{ "text": "GitHub", "link": "https://github.com/melosso/bark" },
{ "text": "Releases", "link": "https://github.com/melosso/bark/releases" }
]
}
],
"sidebar": {
"/getting-started/": [
{
"title": "Introduction",
"items": [
{ "title": "Getting Started", "path": "getting-started/getting-started" },
{ "title": "Configuration", "path": "getting-started/configuration" },
{ "title": "Routing", "path": "getting-started/routing" },
{ "title": "Deploy", "path": "getting-started/deploy" }
]
}
],
"/reference/": [
{
"title": "Reference",
"items": [
{ "title": "Site Config", "path": "reference/site-config" },
{ "title": "API Reference", "path": "reference/api-reference" },
{ "title": "Sitemap & Crawlers", "path": "reference/sitemap-generation" }
]
}
]
},
"socialLinks": [
{ "icon": "github", "url": "https://github.com/melosso/bark", "title": "GitHub" }
]
}A topNav item is either a direct link (text + link) or a dropdown (text + items, no link), exactly the two shapes shown above. sidebar keys are path prefixes: whichever key is the longest match for the page you're viewing wins, so /getting-started/ and /getting-started/advanced/ can coexist, with the more specific one taking over for pages under it.
TIP
When sidebar is present, it takes priority over nav for any page matching one of its prefixes. nav, when present at all, fully replaces the auto-generated folder-based navigation for every page. Neither merges with the folder tree. Leave both out if you want Bark to build navigation from your folders.
Your footer is rendered as Markdown, so links and formatting work exactly as you would expect. For social links, an icon value of "github" or "mastodon" renders as an inline SVG; any other value renders as plain text.