tsackton / taelgar

0 stars 0 forks source link

Support a %% No export %% fence #16

Closed msackton closed 9 months ago

msackton commented 9 months ago

It is useful to be able to distinguish between

(a) notes, in %% blocks, which indicate non-canonical information still under discussion and (b) data which shouldn't be in the export at all

(b) is particularly likely to be used for dataview query blocks or other "helper" information that is not supported on the web side, although if it existed I would use it fairly liberally for campaign secrets that I consider canonical.

This could be done hackily today with a %%Campaign block that points to a non-existent campaign, but it might be nice to have a more proper feature

tsackton commented 9 months ago

You mean for website export? The obsidianhtml markdown cleanup already strips comments (%% blocks) in the md to html conversion. That is why the campaign blocks are %%campaign:key%% and %%end%%. They get stripped but the text in the middle doesn't.

It would be trivial to implement a %%noexport%% %%end%% block but I'm not sure what you'd gain, as opposed to just using regular notes.

To remove dataview from export, it would be relatively easy to just strip code blocks.

msackton commented 9 months ago

The purpose is to allow something like this:

image

Stripping the dataview block isn't good enough, because then you get the ugly header (and having the dataview generate the header is a mess).

Additionally, I can see benefit in having information that is canonical in my game that I don't want my players to see be in plain text, not inside %%, especially as it relates to things like detailed events about the past I want them to discover in game, and/or events that are in the future from 1720.

I think both of us consider text wrapped in %% as generally non-canonical, i.e.

%% Some background history %%

Reads as ideas for background, not canonical in-game.

So I can see the benefit of being able to do:

%%NoExport%% Some background %%End%%

That said, actually playing with it, %%^Campaign:None%% works totally fine so I'm not sure the point of doing anything else.