Skip to content

Configure directory in Assets emitter #2344

@franco-ruggeri

Description

@franco-ruggeri

Is your feature request related to a problem? Please describe.

Consider the Assets emitter. It is not possible to emit non-markdown files only from a specific subfolder (e.g., _assets). To the best of my knowledge, using ignorePatterns, there is no way to:

  • Include non-markdown files in a specific subfolder (e.g., _assets).
  • Exclude non-markdown files elsewhere.

Even if there is a particular ignorePatterns to achieve that, globby will still have to scan the whole folder. With a huge content folder containing a lot of non-markdown files that don't need to be included, it is really slow.

I have this problem in my setup:

  • I mount the content folder from the cloud. So, it contains a lot of non-markdown files.
  • The assets linked in markdown documents are in a specific subfolder: _assets. All the other assets are unrelated to Markdown documents and not needed in the generated static site. So, my final static site only needs to include _assets + markdown files.

Describe the solution you'd like

Add a configuration for the Assets emitter to only scan a subfolder. Specifically, we'd need to make the first parameter to glob here configurable in quartz.config.ts.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions