ar.falsy.cat/content/notes/ignore-notes.md

31 lines
1022 B
Markdown
Raw Normal View History

2021-07-19 22:02:16 +00:00
---
title: "Ignoring Notes"
---
### Quartz Ignore
Edit `ignoreFiles` in `config.toml` to include paths you'd like to exclude from being rendered.
```toml
...
ignoreFiles = [
"/content/templates/*",
"/content/private/*",
2021-07-30 01:26:18 +00:00
"<your path here>"
2021-07-19 22:02:16 +00:00
]
```
`ignoreFiles` supports the use of Regular Expressions (RegEx) so you can ignore patterns as well (e.g. ignoring all `.png`s by doing `\\.png$`).
2021-10-25 06:17:20 +00:00
To ignore a specific file, you can also add the tag `draft: true` to the frontmatter of a note.
```markdown
---
title: Some Private Note
draft: true
---
...
```
2021-07-19 22:02:16 +00:00
More details in [Hugo's documentation](https://gohugo.io/getting-started/configuration/#ignore-content-and-data-files-when-rendering).
### 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.