Skip to content

Support .yfmignore to exclude files from processing #1398

@martyanovandrey

Description

@martyanovandrey

Description

Add support for a .yfmignore file in the project root to specify files and directories that should be skipped by the CLI. The file should accept relative paths and glob patterns.


Use Case

  • Exclude drafts, temporary files, large asset folders, or generated content from parse/validate/build steps.
  • Speed up builds and reduce noise.

Expected Behavior

  • If .yfmignore exists, the CLI excludes matching files from all processing stages (parse, validate, build, search index, etc.).
  • Patterns are resolved relative to the project root.

Supported Syntax

  • Glob patterns: *, **, ?, [abc]
  • Directory patterns: directory with trailing slash
  • Negation: ! to re-include files/folders
  • Comments: lines starting with #
  • Blank lines: are ignored
  • Cross-platform: works consistently on all operating systems

Example .yfmignore

# ignore drafts and tmp
drafts/**
tmp/**

# ignore images but keep logos
assets/images/**
!assets/images/logos/**

Acceptance Criteria

  • The CLI reads and applies .yfmignore when present.
  • Files matching ignore patterns are not processed or reported as missing.
  • Negation patterns work as expected.
  • No change in behavior when .yfmignore is absent.
  • Clear documentation is added, including examples.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions