Specify a list of folders that cannot be published

I’m currently torn between using a single vault for all my information and being able to publish selected notes against the risk of accidentally publishing something that I don’t want public.

The most common example would be to prevent the accidental publishing of a journal online but other examples include personal contact information of others, finances etc.

I think this could be solved by specifying a list of folders that will never show up for publishing. This will remove the risk.

4 Likes

Good idea! Obsidian Sync has this feature, and it makes a lot of sense in Publish as well.

1 Like

Hopefully it’s not too hard to implement then :slight_smile:

bumped - any updates or ETA on this feature request?

I have a vault that is being published on my website. There are some folders that I never want to publish (for example drafts, or my private notes). Right now it’s very easy to publish a folder by accident (by clicking “select all” in the New list in Publish Changes panel, or accidentally clicking on a checkbox next to the folder).

It would be very convenient to be able to permanently hide some folders from that list, make them unpublishable, so that they never get pushed to the web by accident.

A possible workaround is to just keep all the private notes in the separate vault, but it doesn’t make sense for drafts of my blog posts for example. Also there’s no convenient way to work on multiple vaults in the iOS app at the moment (at least I wasn’t able to find it), since switching between vaults requires multiple clicks.

There is the publish: true/false yaml flag.
Not exactly what you want, but should have the same result.

2 Likes

Thank you, this is very useful!

Does something like this exist for directories?

No, that’s just on a file basis. Sorry :confused:

I’d like to propose a .publishignore file that works exactly like a .gitignore file.

1 Like

Th

This can be potentially solved with the Config to ignore files/folders approach, if it gets implemented i.e. add a folder in a .obsignore document, and tag it with %nopublish or something similar.

Ideally it wouldn’t be necessary to mark individual files though, and would work based on folders.

1 Like

This was implemented with the inclusion/exclusion lists.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.