Comment-out for publish only

Use case or problem

Despite my expectations, I started to use Obsidian publish – and it is quite great for maintaining a somewhat informal “database” for my academic project. (I was planning to do that on my own website, but too much maintenance…).
In some notes, it would be nice to be able to publish not the whole note but only parts of it. (E.g., I have some dataview tables that don’t work in publish and are just gibberish; other things that do work but I would rather keep them private.)

Proposed solution

I use the comment out syntax quite a bit (%%); it would be really great if there were a “comment out in publish only” version of it, which would keep the block in preview mode, but would hide it from publish.

Current workaround

Of course one can always keep a separate note for things one doesn’t want to publish. But sometimes I like keeping things together.

3 Likes