Skip to content

Use an optional .mdbookignore file to specify files to not copy to the output directory #1187

Open
@andrewdavidmackenzie

Description

@andrewdavidmackenzie

Current Behaviour

Currently almost all files in the source directory are copied to the output directory, often copying unneeded or undesired files, which maybe uploaded to gh-pages or otherwise "published"

Proposed Change

Allow an optional “.mdbookignore” file (like .gitignore) to allow specifying patterns of files to ignore and hence NOT get copied during the build.

Implementation

If you provide comments, and the general idea seems acceptable, I would prepare a PR for this.

I would use the existing "ignore" crate from the ripgrep project, and using the provided method to override the name of the ignore file from ".gitignore" to ".mdbookignore"

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ConfigurationArea: ConfigurationA-ignoreArea: gitignore, ignoring files

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions