quartz icon indicating copy to clipboard operation
quartz copied to clipboard

Quartz build applies root .gitignore unintentionally

Open sean2077 opened this issue 3 weeks ago • 1 comments

Describe the bug When running quartz build, the build process incorrectly applies the .gitignore file from the project root directory. This causes certain files or directories that should be processed to be excluded from the build output.

To Reproduce Steps to reproduce the behavior:

  1. Create a .gitignore file in the project root with entries like obsidian-vault or other content directories
  2. Run npx quartz build -d obsidian-vault --serve --concurrency 8
  3. Observe that files matching patterns in the root .gitignore are excluded from the build
  4. The expected content is missing from the output

Expected behavior The quartz build command should only respect .gitignore files within the content source directory (e.g., obsidian-vault/.gitignore), not the project root .gitignore. The root .gitignore is meant for development purposes (e.g., ignoring node_modules, .obsidian folders) and should not affect which content files are processed during the build.

Root .gitignore contains entries like:

  • obsidian-vault (the actual content directory)
  • .obsidian
  • private/
  • etc.

These patterns are being incorrectly applied during the build process.

Desktop (please complete the following information):

  • Quartz Version: v4.5.2
  • node Version: v24.11.1
  • npm version: v11.6.2
  • OS: Windows
  • Browser: N/A (build-time issue)

Additional context This issue affects the ability to use common .gitignore patterns for development workflow management without interfering with the build process. The build tool should maintain separation between development ignore patterns and content processing patterns.

sean2077 avatar Dec 07 '25 05:12 sean2077

This is intended behaviour, because sadly napi-rs/simple-git is rather narly/costly.

not necessarily a bug, but I think there is a good point to support recursively support .gitignore.

aarnphm avatar Dec 09 '25 20:12 aarnphm