iron-vault-plugin / iron-vault

Obsidian plugin for Ironsworn/Starforged games
https://ironvault.quest/
Other
44 stars 8 forks source link

markdown block renderers don't show up in backlinks #78

Open zkat opened 4 months ago

zkat commented 4 months ago

I think this might be happening because we're passing empty strings to the sourceFile argument of MarkdownRenderer.render? But I'm not sure if that'll fix it.

zkat commented 3 months ago

omg here's a really "evil" way of pulling this off:

  1. After every iron-vault-* block, we add a <!-- iv-block-links -->[[Some Link|iv-backlink]]<!-- /iv-block-links --> line, which is updated whenever the block is rendered, with whatever wiki links we parsed while rendering the block. We might have to make a wrapper around MarkdownRenderer.render() that parses out these links and returns them to the caller somehow.
  2. We add a style for [alt~="iv-backlink"] to display: none them.

These links won't look pretty in the backlink browser, but they'll point to generally the right place, and definitely make things show up in the graph properly.

zkat commented 3 months ago

taking this off the milestone for now. We have other things to do that are more important.