Skip to content

Support for HTML Renderer to honor .gitignore#2991

Open
benfalk wants to merge 2 commits intorust-lang:masterfrom
benfalk:master
Open

Support for HTML Renderer to honor .gitignore#2991
benfalk wants to merge 2 commits intorust-lang:masterfrom
benfalk:master

Conversation

@benfalk
Copy link

@benfalk benfalk commented Dec 19, 2025

The Watcher and Poller already respected .gitignore files when monitoring for changes; however, the HTML Renderer did not. This update ensures that the HTML Renderer also honors .gitignore. This prevents ignored files from being processed and included in the generated HTML output.

I noticed this when working on a project where the mdbook source directory was the root of the project. mdBook was taking a long time to copy the entire contents of the target directory into the book which was gigabytes in size. After this change, the HTML renderer correctly ignored the target directory as specified in the .gitignore file, significantly speeding up the build process.

The Watcher and Poller already respected `.gitignore` files when
monitoring for changes; however, the HTML Renderer did not. This
update ensures that the HTML Renderer also honors `.gitignore`.
This prevents ignored files from being processed and included in
the generated HTML output.

I noticed this when working on a project where the mdbook source
directory was the root of the project.  mdBook was taking a long
time to copy the entire contents of the `target` directory into
the book which was gigabytes in size.  After this change, the HTML
renderer correctly ignored the `target` directory as specified in
the `.gitignore` file, significantly speeding up the build process.
@rustbot rustbot added the S-waiting-on-review Status: waiting on a review label Dec 19, 2025
@rustbot
Copy link
Collaborator

rustbot commented Feb 1, 2026

☔ The latest upstream changes (possibly a3550f9) made this pull request unmergeable. Please resolve the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: waiting on a review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants