Skip to contentSkip to Content
Configuration

Configuration

Complete reference for every option in your docs.yaml file.

Quick Start

Start with the project name and at least one source input. Folio needs Python source paths or Markdown docs to generate pages:

Minimum docs.yaml

This is enough for Folio to scan source, write _site/, and enable the default docs theme.

project: name: "my-library" source: python: paths: - "src/my_library" docs: - "docs"
project.name
The product name shown in navigation, metadata, and generated pages.
string
source.python.paths
Python packages or modules to scan.
list[string]
source.docs
Markdown guide directories to include.
list[string]

This scans your Python package and Markdown guides, outputs to _site/, and enables dark mode.

Full Reference

Here is every available section and field.

project

Project metadata shown in the navbar, page titles, and generated output.

FieldTypeDefaultDescription
namestring"Untitled"Project name displayed in the navbar and page titles. If missing or empty, a warning is emitted and "Untitled" is used.
versionstring"0.0.0"Version string shown in the docs header.
repostring""URL to the source repository (e.g. GitHub). Enables “Edit this page” links in the generated site.
repo_refstring"main"Branch, tag, or commit used for generated source links.
urlstring""Public site URL for sitemap, canonical metadata, and social previews. It does not control local routing or static asset paths.
project: name: "my-library" version: "2.0.0" repo: "https://github.com/org/my-library" repo_ref: "main"

source

Controls where folio looks for source code and documentation files.

deploy

Controls deployment-specific path handling. Most sites can omit this section. Use it when the static site is published under a subpath such as /my-repo.

Base path priority is:

  1. FOLIO_BASE_PATH environment variable.
  2. deploy.base_path in docs.yaml.
  3. GitHub Pages inference when deploy.provider: "github-pages" or FOLIO_DEPLOY_PROVIDER=github-pages is active in GitHub Actions.
  4. No base path.

folio serve stays rooted at / unless FOLIO_BASE_PATH is explicitly set.

FieldTypeDefaultDescription
provider"github-pages" | string""Enables provider-specific inference. For GitHub Pages project sites, Folio infers /\{repo\} from GITHUB_REPOSITORY; user or organization pages like owner.github.io stay at /.
base_pathstring""Explicit static asset base path such as "/docs" or "/my-repo". Use "/" for a root deployment.
deploy: provider: "github-pages"

For custom domains or reverse proxies, set the base path explicitly:

deploy: base_path: "/"

source.python

The python key can be either a mapping (recommended) or a simple list of paths.

Mapping form (recommended):

FieldTypeDefaultDescription
pathslist[string][]Directories containing Python source code to document. Each path is resolved relative to the project directory.
excludelist[string][]Glob patterns or directory paths to exclude from documentation. Useful for skipping tests, vendored code, or internal modules.
docstring_stylestring"auto"Docstring format to parse. Options: "auto", "google", "numpy".

source.python

Use the mapping form when you need exclusions or a specific docstring parser.

source: python: paths: - "src/my_library" exclude: - "**/test_*.py" - "src/my_library/_internal/" docstring_style: "numpy"
paths
Python source directories to scan.
list[string]
exclude
Glob patterns or directories to skip.
list[string]default: []
docstring_style
Docstring parser: auto, google, or numpy.
stringdefault: auto

List form (shorthand):

You can also pass a plain list of paths. In this case, no exclude patterns are applied:

source: python: - "src/my_library" - "src/my_library_utils"

source.docs

FieldTypeDefaultDescription
docslist[string][]Directories containing Markdown (.md) documentation pages. These are converted to MDX and included in the site alongside the API reference.
source: docs: - "docs/"

.rst files are migration inputs, not build inputs. Convert them to Markdown before placing them in source.docs; Folio warns when .rst files are present in a docs source directory.

output

FieldTypeDefaultDescription
outputstring"_site"Directory where the generated documentation site is written. Resolved relative to the project directory. Removed by folio clean.
output: "build/docs"

Folio keeps an incremental manifest in .build/. The manifest includes source hashes plus config, template, and generator fingerprints, so changing docs.yaml or the generator invalidates stale generated pages automatically.

theme

Controls the visual appearance of the generated documentation site.

FieldTypeDefaultDescription
presetstring"organic-editorial"Default visual preset for the generated site. folio init offers organic-editorial, beacon, atlas, and workshop; advanced users can use any preset id available in the bundled theme library.
dark_modebooltrueEnable the dark mode toggle. When enabled, users can press d to switch between light and dark themes.
logostring""Path to a logo image file displayed in the navbar. Resolved relative to the project directory.
faviconstring""Path to a favicon file. Resolved relative to the project directory.
theme: preset: "organic-editorial" dark_mode: true logo: "docs/assets/logo.svg" favicon: "docs/assets/favicon.ico"

Controls the built-in full-text search powered by Pagefind . Search is enabled by default, appears in the docs navbar, and opens with Cmd+K on macOS or Ctrl+K on Windows/Linux.

FieldTypeDefaultDescription
enabledbooltrueEnable or disable the navbar search. Set to false to hide search entirely.
placeholderstring""Custom placeholder text for the search input. When empty, the default “Search documentation…” is used.
search: enabled: true placeholder: "Search documentation..."

To disable search completely:

search: enabled: false

An ordered list of strings defining the top-level navigation sections. The order here determines the order in the navbar. "API Reference" is typically generated automatically from your Python sources.

FieldTypeDefaultDescription
navlist[string][]Top-level navigation sections.
nav: - "Introduction" - "Getting Started" - "API Reference" - "Changelog"

llm

Controls generation of llms.txt  files for AI consumption.

FieldTypeDefaultDescription
generate_llms_txtbooltrueGenerate an llms.txt summary file in the output directory. This is a condensed index of your documentation for LLMs.
generate_llms_full_txtbooltrueGenerate an llms-full.txt file containing the full text of all documentation pages.
llm: generate_llms_txt: true generate_llms_full_txt: false

Path Resolution

In CLI commands, relative paths in docs.yaml are resolved from the active project directory. When you run folio build /path/to/project or folio build --project-dir /path/to/project, that directory becomes the base for config paths. If you call load_config() directly, file plugin paths are resolved from the directory containing the config file.

For example, given this structure:

my-project/ docs.yaml src/ my_lib/ __init__.py docs/ index.md

The config source.python.paths: ["src/my_lib"] resolves to /path/to/my-project/src/my_lib.

Config Validation

folio validates your config file and warns about issues:

  • Unknown top-level keys produce a warning listing the unrecognized keys. Core top-level keys are: project, source, output, theme, nav, llm, search, and deploy.

  • Missing or empty project.name produces a warning and defaults to "Untitled".

  • Missing config file raises a FileNotFoundError with the path that was expected.

  • MVP-disabled features are excluded from public docs, API reference, search, sitemap, and LLM output until the feature is ready to publish as beta.

These are warnings, not errors — the build will still proceed with defaults where possible.

Common Patterns

Monorepo Setup

When your Python package lives in a subdirectory of a larger repository:

project: name: "my-service" repo: "https://github.com/org/monorepo" source: python: paths: - "packages/my-service/src/my_service" exclude: - "**/test_*.py" - "**/conftest.py" docs: - "packages/my-service/docs/" output: "packages/my-service/_site"

Excluding Test Files

Keep test files out of your API reference:

source: python: paths: - "src/" exclude: - "**/test_*.py" - "**/tests/" - "**/conftest.py" - "src/my_lib/_fixtures/"

Custom Output Directory

Write the built site to a specific location for CI/CD deployment:

output: "build/site"

Multiple Python Source Directories

Document code spread across multiple directories:

source: python: paths: - "src/core" - "src/plugins" - "src/utils"

Minimal Docs-Only Site

If you just want to serve Markdown documentation without Python API reference:

project: name: "My Docs" source: docs: - "docs/" nav: - "Guide" - "FAQ"