Skip to content

Quartz build applies root .gitignore unintentionally #2240

@sean2077

Description

@sean2077

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions