Skip to content

Configuration Reference

This page documents every option available in docsforge.yml. Use it as a complete reference when customizing your site.


Top-level settings

site_name

The title of your documentation site. Displayed in the header, browser tab, and social cards.

site_name: My Documentation
TypeDefaultRequired
stringYes

site_url

The canonical URL where your site will be hosted. Used for social cards, RSS feeds, and absolute link generation.

site_url: https://example.com/docs/
TypeDefaultRequired
stringnullNo

Trailing slash

Always include a trailing slash for consistency:

site_url: https://example.com/docs/  # Good
site_url: https://example.com/docs   # Avoid

site_author

The author name. Used in metadata and RSS feeds.

site_author: Jane Doe
TypeDefaultRequired
stringnullNo

site_description

A short description of your site. Used in meta tags and social cards.

site_description: Documentation for the Example Platform
TypeDefaultRequired
stringnullNo

Copyright notice displayed in the footer.

copyright: Copyright © 2025 Example Inc.
TypeDefaultRequired
stringnullNo

repo_url

URL to your source repository. Adds an edit icon in the header linking to the repo.

repo_url: https://github.com/example/docs
TypeDefaultRequired
stringnullNo

repo_name

Display name for the repository link. Defaults to the last path segment of repo_url.

repo_name: example/docs
TypeDefaultRequired
stringAutoNo

edit_uri

Path suffix for the "Edit this page" link. Combined with repo_url to create the full edit URL.

edit_uri: edit/main/docs/
TypeDefaultRequired
stringnullNo

strict

When true, warnings are treated as errors and the build fails.

strict: true
TypeDefaultRequired
booleanfalseNo

dev_addr

Address for the development server.

dev_addr: 127.0.0.1:8000
TypeDefaultRequired
string127.0.0.1:8000No

use_directory_urls

When true (default), pages are built as page/index.html instead of page.html. This creates cleaner URLs (/page/ instead of /page.html).

use_directory_urls: true
TypeDefaultRequired
booleantrueNo

docs_dir

Directory containing your Markdown source files.

docs_dir: docs
TypeDefaultRequired
stringdocsNo

site_dir

Directory where the built site is output.

site_dir: site
TypeDefaultRequired
stringsiteNo

extra_css

Additional CSS files to include. Paths are relative to docs_dir.

extra_css:
  - stylesheets/custom.css
TypeDefaultRequired
list[]No

extra_javascript

Additional JavaScript files to include. Paths are relative to docs_dir.

extra_javascript:
  - javascripts/analytics.js
TypeDefaultRequired
list[]No

Remove vendored assets

Do not include KaTeX, Mermaid, or Material Icons here. They are built-in.


Theme settings

Theme settings live under the theme: block, just like MkDocs Material.

theme:
  name: material
  palette:
    - media: "(prefers-color-scheme: light)"
      scheme: default
      primary: indigo
      accent: indigo
      toggle:
        icon: material/brightness-7
        name: Switch to dark mode
    - media: "(prefers-color-scheme: dark)"
      scheme: slate
      primary: indigo
      accent: indigo
      toggle:
        icon: material/brightness-4
        name: Switch to light mode
  features:
    - navigation.tabs
    - navigation.sections
    - navigation.top
    - search.suggest
    - search.highlight
    - content.code.copy
  logo: assets/logo.svg
  favicon: assets/favicon.svg
  icon:
    repo: fontawesome/brands/github

theme.name

The theme to use. DocsForge bundles Material, so this is usually material.

theme:
  name: material
TypeDefaultRequired
stringmaterialNo

theme.palette

Color scheme configuration. Supports light/dark mode toggling.

theme:
  palette:
    - media: "(prefers-color-scheme: light)"
      scheme: default
      primary: indigo
      accent: indigo
      toggle:
        icon: material/brightness-7
        name: Switch to dark mode
    - media: "(prefers-color-scheme: dark)"
      scheme: slate
      primary: indigo
      accent: indigo
      toggle:
        icon: material/brightness-4
        name: Switch to light mode
PropertyTypeDescription
mediastringCSS media query for auto-switching
schemestringColor scheme: default or slate
primarystringPrimary color: red, pink, purple, deep-purple, indigo, blue, light-blue, cyan, teal, green, light-green, lime, yellow, amber, orange, deep-orange, brown, grey, blue-grey, black, white
accentstringAccent color (same options as primary)
toggleobjectToggle button configuration
toggle.iconstringIcon identifier
toggle.namestringTooltip text

theme.features

Navigation and UI features to enable.

theme:
  features:
    - navigation.tabs
    - navigation.sections
    - navigation.expand
    - navigation.path
    - navigation.top
    - search.suggest
    - search.highlight
    - content.tabs.link
    - content.code.copy
    - content.action.edit
FeatureDescription
navigation.tabsTop-level navigation tabs
navigation.sectionsSection pages in sidebar
navigation.expandExpand all sections by default
navigation.pathBreadcrumb navigation
navigation.topBack-to-top button
navigation.footerPrevious/next footer links
search.suggestSearch suggestions in header
search.highlightHighlight search terms in results
search.shareShare search query links
content.tabs.linkLink content tabs across pages
content.code.copyCopy button on code blocks
content.code.annotateCode annotations
content.action.editEdit page button
content.action.viewView source button
header.autohideAuto-hide header on scroll
announce.dismissDismissible announcement bar

theme.icon

Icon configuration for various UI elements.

theme:
  icon:
    repo: fontawesome/brands/github
    logo: material/library
PropertyTypeDescription
repostringIcon for repository link
logostringIcon used in logo area
admonitionobjectCustom admonition icons

Path to your site logo (relative to docs_dir).

theme:
  logo: assets/logo.svg
TypeDefaultRequired
stringnullNo

theme.favicon

Path to favicon (relative to docs_dir).

theme:
  favicon: assets/favicon.svg
TypeDefaultRequired
stringnullNo

theme.language

Site language for internationalization.

theme:
  language: en
TypeDefaultRequired
stringenNo

theme.direction

Text direction.

theme:
  direction: ltr
TypeDefaultOptions
stringltrltr, rtl

theme.custom_dir

Directory for custom templates and overrides (relative to docs_dir).

theme:
  custom_dir: overrides
TypeDefaultRequired
stringnullNo

Plugin settings

DocsForge has many plugins built-in. Most require no configuration. Only add settings if you need to customize behavior.

plugins

plugins:
  search:
    lang: en
  tags:
    tags_file: tags.md
  blog:
    blog_dir: blog
    blog_toc: true
  minify:
    minify_html: true

search plugin

OptionTypeDefaultDescription
langstringenSearch language for stemming
separatorstring[\s\-]+Word separator regex
pipelinelist[trimmer, stopWordFilter, stemmer]Processing pipeline
min_search_lengthinteger3Minimum query length
prebuild_indexbooleanfalsePrebuild Lunr index
index_dynamicsbooleanfalseDynamic index updates

tags plugin

OptionTypeDefaultDescription
tags_filestringtags.mdPage for tag index
tags_extra_fileslist[]Extra tag files
tags_hierarchybooleanfalseEnable tag hierarchy

blog plugin

OptionTypeDefaultDescription
blog_dirstringblogBlog posts directory
blog_tocbooleanfalseShow table of contents
post_date_formatstringlongDate format
post_excerptstringoptionalExcerpt behavior
post_readtimebooleantrueShow reading time
post_url_formatstring{date}/{slug}URL pattern
archive_date_formatstringYYYYArchive format
archive_url_formatstringarchive/{date}Archive URL
categories_url_formatstringcategory/{slug}Category URL
pagination_url_formatstringpage/{page}Pagination URL
authors_filestring.authors.ymlAuthors file

minify plugin

OptionTypeDefaultDescription
minify_htmlbooleantrueMinify HTML output
minify_cssbooleantrueMinify CSS
minify_jsbooleantrueMinify JavaScript
cache_bustingbooleantrueAdd cache-busting hashes
htmlmin_optsobject{}Extra htmlmin options

privacy plugin

OptionTypeDefaultDescription
enabledbooleantrueEnable plugin
concurrencyintegerCPU count - 1Download concurrency
cachebooleantrueCache downloaded assets between builds
cache_dirstring.cache/plugin/privacyLocal cache directory
logbooleantrueLog downloads
log_levelstringinfoDownload log level: error, warn, info, debug
assetsbooleantrueDownload external assets
assets_fetchbooleantrueFetch assets from the network
assets_fetch_dirstringassets/externalStorage directory inside site_dir
assets_includelist[]Glob patterns of external URLs to always fetch
assets_excludelist[]Glob patterns of external URLs to skip
assets_expr_mapdict{}Extra regexes for finding assets in CSS/JS
linksbooleantrueProcess external links
links_attr_mapdict{}Extra attributes to add to external links
links_noopenerbooleantrueAdd noopener to external links

info plugin

OptionTypeDefaultDescription
enabledbooleantrueEnable info banner
enabled_on_homebooleanfalseShow on home page

meta plugin

OptionTypeDefaultDescription
meta_filestring.meta.ymlMetadata file
enabledbooleantrueEnable plugin

Markdown extensions

DocsForge enables most common extensions by default. Only configure if you need custom behavior.

markdown_extensions

markdown_extensions:
  - toc:
      permalink: true
      title: On this page
      toc_depth: 3
ExtensionBuilt-inDescription
admonitionYesCallout boxes (!!! note)
pymdownx.detailsYesCollapsible details (??? question)
pymdownx.superfencesYesFenced code blocks with custom fences
pymdownx.highlightYesCode syntax highlighting
pymdownx.inlinehiliteYesInline code highlighting
pymdownx.snippetsYesContent inclusion (--8<--)
pymdownx.tabbedYesTabbed content (=== "Tab 1")
pymdownx.tasklistYesTask lists (- [ ])
pymdownx.emojiYesEmoji and icons (:material-check:)
pymdownx.arithmatexYesMath rendering ($...$, $$...$$)
pymdownx.keysYesKeyboard keys (++ctrl+c++)
pymdownx.markYesHighlighted text (==text==)
pymdownx.criticYesCritic markup
pymdownx.caretYesSuperscript (^text^)
pymdownx.tildeYesSubscript (~text~)
tablesYesMarkdown tables
tocYesTable of contents
metaYesYAML frontmatter
def_listYesDefinition lists
footnotesYesFootnotes ([^1])
attr_listYesAttribute lists ({.class})
md_in_htmlYesMarkdown inside HTML
smartyNoSmart quotes and dashes
sane_listsNoStrict list nesting
wikilinksNoWiki-style links

Extra settings

The extra: section holds custom variables accessible in templates and Markdown via {{ extra.key }}.

extra.social

Social links in the footer.

extra:
  social:
    - icon: fontawesome/brands/github
      link: https://github.com/example
      name: Example on GitHub
    - icon: fontawesome/brands/twitter
      link: https://twitter.com/example
      name: Example on Twitter

extra.alternate

Language alternates for multi-language sites.

extra:
  alternate:
    - name: English
      link: /
      lang: en
    - name: Deutsch
      link: /de/
      lang: de

extra.tags

Tag configuration.

extra:
  tags:
    file: tags.md
    icons:
      - name: "New"
        icon: material/star

extra.annotate

Code annotation settings.

extra:
  annotate:
    json: [.s2]

extra.scope

Google Analytics / Plausible scope.

extra:
  scope:
    analytics: true
    feedback: true

Explicit navigation structure. If omitted, pages are discovered automatically from docs_dir.

nav:
  - Home: index.md
  - Getting Started:
    - Installation: getting-started/installation.md
    - Quick Start: getting-started/quick-start.md
  - Reference:
    - API: reference/api.md
    - CLI: reference/cli.md
  - Blog: blog/
SyntaxDescription
Page Title: path.mdSingle page with custom title
Section:Nested section
Directory/Auto-discover pages in directory
!include pathInclude another nav file

Validation settings

validation

Link, anchor, and navigation validation.

validation:
  nav:
    omitted_files: warn
    not_found: warn
  links:
    absolute_links: warn
    unrecognized_links: warn
    anchors: warn

validation.nav

OptionTypeDefaultDescription
omitted_filesstringinfoFiles not in nav
not_foundstringwarnNavigation links to missing pages
absolute_linksstringinfoAbsolute nav links
OptionTypeDefaultDescription
absolute_linksstringinfoAbsolute Markdown links
unrecognized_linksstringinfoLinks that don't look like internal pages
not_foundstringwarnMarkdown links to missing pages
anchorsstringinfoLinks to missing anchors

Values: warn, info, ignore.


Complete example

# Site metadata
site_name: Example Documentation
site_url: https://docs.example.com/
site_author: Example Team
site_description: Complete documentation for the Example platform
copyright: Copyright &copy; 2025 Example Inc.

# Repository
repo_url: https://github.com/example/docs
repo_name: example/docs
edit_uri: edit/main/docs/

# Directories
docs_dir: docs
site_dir: site
use_directory_urls: true
strict: false

# Theme
theme:
  name: material
  palette:
    - media: "(prefers-color-scheme: light)"
      scheme: default
      primary: indigo
      accent: indigo
      toggle:
        icon: material/brightness-7
        name: Switch to dark mode
    - media: "(prefers-color-scheme: dark)"
      scheme: slate
      primary: indigo
      accent: indigo
      toggle:
        icon: material/brightness-4
        name: Switch to light mode
  features:
    - navigation.tabs
    - navigation.sections
    - navigation.expand
    - navigation.top
    - search.suggest
    - search.highlight
    - content.tabs.link
    - content.code.copy
    - content.action.edit
  logo: assets/logo.svg
  favicon: assets/favicon.svg
  icon:
    repo: fontawesome/brands/github
  language: en

# Custom assets
extra_css:
  - stylesheets/custom.css

extra_javascript:
  - javascripts/analytics.js

# Plugins
plugins:
  search:
    lang: en
  tags:
    tags_file: tags.md
  blog:
    blog_dir: blog
    blog_toc: true

# Extra variables
extra:
  social:
    - icon: fontawesome/brands/github
      link: https://github.com/example
    - icon: fontawesome/brands/twitter
      link: https://twitter.com/example

# Navigation
nav:
  - Home: index.md
  - Getting Started:
    - Installation: getting-started/installation.md
    - Configuration: getting-started/configuration.md
  - Reference:
    - API: reference/api.md
    - CLI: reference/cli.md
  - Blog: blog/

# Validation
validation:
  nav:
    omitted_files: warn
    not_found: warn
  links:
    absolute_links: warn
    unrecognized_links: warn
    anchors: warn