mcndt / obsidian-quickshare

📝 An Obsidian plugin for sharing encrypted Markdown notes on the web. Zero configuration required.
MIT License
249 stars 9 forks source link

[Feature request] Offer a way to strip content not meant for publishing #30

Open niemeyer opened 1 year ago

niemeyer commented 1 year ago

That's a super nice service, thanks for working on it. I have a relatively simple feature request, which I might eventually work on if you don't get to it first:

It would be nice if we could strip some content off the note before publishing. Some of the details of the note are meant for cross linking with other notes which are not going to be available. None of it is a secret, but it's not relevant to any of the readers either.

There are a number of ways to implement it, but we could just offer, for example, a setting that takes a regular expressions for where to start the note. Or maybe a list of regular expressions to be filtered / stripped.

In either case, the goal is just to have some way to polish the output without having to compromise the internal organization.

Thanks for considering it.

mcndt commented 1 year ago

Hi @niemeyer!

Interesting idea! I can see how some parts of notes are not interesting to share with others, e.g. Dataview queries intended for personal navigation.

I'm not exactly sure how to best implement this though. With regexes, we could perhaps add a special code comment sequence that starts/stops including text into the shared output. If we put it inside of the existing Markdown comment syntax (%%), it won't be rendered in reading mode either. So for example:

This text will be included.

%%quickshare-ignore-start%%
This won't be included
%%quickshare-ignore-end%%

This text will also be included.
1nsp1r3rnzt commented 1 year ago

I liked this idea a lot to skip parts of notes using special code comment. I think it can help to skip personal part of a note and still share the note with others.