🪴 Quartz 3.3

Search

Search IconIcon to open search

Ignoring Notes

Last updated Jul 8, 2023 Edit Source

# Quartz Ignore

Edit ignoreFiles in config.toml to include paths you’d like to exclude from being rendered.

1
2
3
4
5
6
...
ignoreFiles = [  
    "/content/templates/*",  
    "/content/private/*", 
    "<your path here>"
]

ignoreFiles supports the use of Regular Expressions (RegEx) so you can ignore patterns as well (e.g. ignoring all .pngs by doing \\.png$). To ignore a specific file, you can also add the tag draft: true to the frontmatter of a note.

1
2
3
4
5
---
title: Some Private Note
draft: true
---
...

More details in Hugo’s documentation.

# Global Ignore

However, just adding to the ignoreFiles will only prevent the page from being access through Quartz. If you want to prevent the file from being pushed to GitHub (for example if you have a public repository), you need to also add the path to the .gitignore file at the root of the repository.