Configuration

.docsalot.yaml

Configure which files and folders should be excluded from documentation generation

Introduction

The .docsalot.yaml file allows you to customize how Docsalot processes your repository. Place this file in the root of your repository to configure which files and folders should be excluded from documentation generation.

Getting Started

Create a .docsalot.yaml file in the root of your repository with the following structure:

# .docsalot.yaml
ignore:
  - "*.log"
  - "temp/"
  - "build/"

ignoreFolders:
  - "node_modules/"
  - ".git/"
  - "dist/"

ignoreFiles:
  - ".env"
  - "*.test.js"
  - "*.spec.ts"

Configuration Options

ignore

A list of general patterns for files, folders, or glob patterns to ignore. This is the most flexible option.

ignore:
  - "*.log"           # Ignore all log files
  - "temp/"           # Ignore temp folder
  - "**/*.test.js"    # Ignore all test files
  - "docs/draft/"     # Ignore draft docs folder

ignoreFolders

Specifically for folder patterns. Use this for better organization when you have many folders to ignore.

ignoreFolders:
  - "node_modules/"
  - ".git/"
  - "dist/"
  - "build/"
  - ".next/"
  - "coverage/"

ignoreFiles

Specifically for file patterns. Use this for better organization when you have many files to ignore.

ignoreFiles:
  - ".env"
  - ".env.local"
  - "*.test.js"
  - "*.spec.ts"
  - "package-lock.json"
  - "yarn.lock"

Pattern Matching

Docsalot supports multiple pattern matching strategies:

1. Glob Patterns

Use glob patterns for flexible matching:

  • * - Matches any characters (except /)
  • ** - Matches any characters (including /)
  • ? - Matches any single character
  • [abc] - Matches any character in the set
  • {a,b} - Matches any of the patterns

2. Simple String Matching

If no glob characters are detected, Docsalot uses simple matching:

  • Contains: Pattern found anywhere in the path
  • StartsWith: Path starts with the pattern
  • EndsWith: Path ends with the pattern

3. Folder Patterns

Patterns ending with / are treated as folder patterns and will match entire directories.

Common Use Cases

JavaScript/TypeScript Project

ignore:
  - "node_modules/"
  - "dist/"
  - "build/"
  - "coverage/"
  - "*.test.ts"
  - "*.test.js"
  - "*.spec.ts"
  - "*.spec.js"
  - ".env*"
  - "yarn.lock"
  - "package-lock.json"

Python Project

ignore:
  - "__pycache__/"
  - "*.pyc"
  - ".pytest_cache/"
  - "venv/"
  - ".venv/"
  - "dist/"
  - "build/"
  - "*.egg-info/"
  - ".env"
  - "*.test.py"

Monorepo Structure

ignore:
  - "**/node_modules/"
  - "**/dist/"
  - "**/build/"
  - "**/*.test.*"
  - "packages/internal/"
  - "tools/scripts/temp/"
  - ".turbo/"
  - ".next/"

Best Practices

  • Always ignore dependency folders like node_modules/,venv/ to reduce processing time
  • Exclude build artifacts like dist/,build/ to focus on source code
  • Ignore test files if you only want to document production code
  • Use glob patterns for more flexible matching across your entire repository
  • Organize patterns by using ignoreFolders andignoreFiles for better readability
  • Never commit sensitive files - always exclude .env files and credentials

Note: The .docsalot.yaml file itself is always excluded from documentation generation by default.