Skip to content

Commit

Permalink
docs: clarifications about globs (jackyzha0#559)
Browse files Browse the repository at this point in the history
* Add note about fast-glob

* Add warning about non-markdown files

Also added a glob pattern to filter out all non-markdown files outside of a specified folder.

* run npm format

---------

Co-authored-by: wych <[email protected]>
  • Loading branch information
bluerosegarden and wychwitch authored Oct 31, 2023
1 parent 01fc8e4 commit 06ccb89
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/features/private pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,17 @@ There may be some notes you want to avoid publishing as a website. Quartz suppor

If you'd like to only publish a select number of notes, you can instead use `Plugin.ExplicitPublish` which will filter out all notes except for any that have `publish: true` in the frontmatter.

> [!warning]
> Regardless of the filter plugin used, **all non-markdown files will be emitted and available publically in the final build.** This includes files such as images, voice recordings, PDFs, etc. One way to prevent this and still be able to embed local images is to create a folder specifically for public media and add the following two patterns to the ignorePatterns array.
>
> `"!(PublicMedia)**/!(*.md)", "!(*.md)"`
## `ignorePatterns`

This is a field in `quartz.config.ts` under the main [[configuration]] which allows you to specify a list of patterns to effectively exclude from parsing all together. Any valid [glob](https://github.com/mrmlnc/fast-glob#pattern-syntax) pattern works here.
This is a field in `quartz.config.ts` under the main [[configuration]] which allows you to specify a list of patterns to effectively exclude from parsing all together. Any valid [fast-glob](https://github.com/mrmlnc/fast-glob#pattern-syntax) pattern works here.

> [!note]
> Bash's glob syntax is slightly different from fast-glob's and using bash's syntax may lead to unexpected results.
Common examples include:

Expand Down

0 comments on commit 06ccb89

Please sign in to comment.