quartz icon indicating copy to clipboard operation
quartz copied to clipboard

Whitelisting pages

Open emarshphd opened this issue 3 years ago • 5 comments

It would be useful to be able to whitelist pages. In other words, choose which pages get published, rather than having to exclude them.

emarshphd avatar Jul 23 '21 03:07 emarshphd

I agree with the above, but I'd also like to do that from the meta section in the page itself.

nateritter avatar Jul 23 '21 05:07 nateritter

Will look into this sometime this week! @nateritter, do you mean having a potential publish flag in the front matter of the Markdown? So something like

---
title: Example Post
publish: true
---

Content here...

jackyzha0 avatar Jul 23 '21 14:07 jackyzha0

Exactly!

nateritter avatar Jul 23 '21 14:07 nateritter

You could do it the other way around (if you're using templates). If your note-template looks something like the following, all notes would by default be excluded (I'm using templater instead of Obsidians default template-plugin btw).

---
title: "<% tp.file.title %>"
creation date: <% tp.file.creation_date() %>
draft: true
---
# <% tp.file.title %>
<% tp.file.cursor() %>

But I agree, not having to add it to ALL notes and doing it the other way around would be nice :)

flatrick avatar Nov 21 '21 18:11 flatrick

The above template workaround works for new notes but not large imported vaults (if you don't want mass changes to notes). Another workaround would be to add an ignoreFile RegEx in config.toml that ignores all files without some string in the file name (say, an emoji) which you can then add to the file name to whitelist the note.

shinyben avatar Mar 22 '22 05:03 shinyben

My current workaround is by setting draft: true as a default frontmatter using cascade.

# config.toml
# make draft by default
[[cascade]]
draft = true
[cascade._target]
  path = '/notes/**'

This unpublishes all markdown files under '/content/notes/' unless I write draft: false individually in the frontmatter. Example:

---
# markdown file in /content/notes/
title: Example Post
draft: false
---

(I'm not sure why it doesn't seem to work if I try to do it for everything under '/content/' though)

chaosarium avatar Oct 21 '22 02:10 chaosarium

This issue should be fixed in Quartz 4. I'll be closing it for now but please reopen this issue if this persists in the new version.

jackyzha0 avatar Aug 20 '23 02:08 jackyzha0