life-itself/web3

Support Obsidian wiki link syntax in publishing to website

rufuspollock opened this issue · 1 comments

Obsidian extends basic markdown with special wiki-link syntax, transclusion and tags. As per https://obsidian.md/features

-   **[[Internal links]]**
-   **![[Filename]]** to embed notes and other files

Acceptance

Supports these types of links:

  • [[Internal link]]
  • [[Internal link|With custom text]]
  • [[Internal link#heading]]
  • [[Internal link#heading|With custom text]]

🚩 NB we assume that internal links are the right path - we don't do any kind of resolution. This is important to flag (?) somewhere as default obsidian behaviour is shortest path e.g. if actual path is abc/mynote.md obsidian with just have [[mynote]]

Transclusion links

May as well as do these even if for things other than images they won't really work.

🚩 need to think about how to do transclusion for things other than images. PDFs especially would be nice. (Other markdown docs is a bit complex as it requires an ability to pull that content ...)

  • ![[Embed image or note path]] => (in markdown) ![](Embed image or note path)
  • ![[Embed note#heading]] ❌ leave for now ...

Tasks

  • Research if existing remark plugin solutions exist ✅ Rufus has researched quickly and best option is below.
  • Create a new folder
  • Write a test (best if we can copy over!), probably just for basic string parser - we are doing TDD 😄
  • Get test passing
  • Get a proper test for remark plugin
  • Get it passing
  • Add docs to README
  • Publish to npm

Notes

existing remark solutions

Fixed all major tasks except for transclusion links.