Open yanivabir opened 9 months ago
Please look into pandoc, or ask its community if this is possible.
This feature is implemented as part of the obsidian-pandoc extension (which appears to be an alternative to this extension).
See https://github.com/OliverBalfour/obsidian-pandoc/issues/4
Unfortunately the export to Word didn't work for me using obsidian-pandoc, but perhaps the same feature could be implemented in this extension too. I think it should be part of the extension, rather than part of pandoc itself.
If it helps, I've developed a Pandoc filter that replaces Obsidian syntax with common Markdown syntax, including WikiLink (it can also converts Obsidian comment %%
to HTML commentary).
https://gist.github.com/josephgarnier/ab5f9c8750b6bfa08c38fe130546cf7b
See the function obsidian_converter.convert_wikilink
. Its description is:
---Parse inline block to substitue all wiki links by their alias text or their page link as text.
---
---For example:
---- `[[Link/to/my/page]]` become `Link/to/my/page`
---- `[[Link/to/my/page|Page alias]]` become `Page alias`
Let me know if you need some help to use it.
@josephgarnier Would you like to integrate your pandoc filter into this plugin?
In fact, it is just to modify the following file. I remember that pandoc can specify multiple lua-filters, and it will be executed in sequence.
https://github.com/mokeyish/obsidian-enhancing-export/blob/main/src/export_templates.ts
@mokeyish sure, i'll do a PR.
I saw that enhancing export can now render wikilinks correctly.
It would be great to have the option to drop all links, replacing them with plain text - since most internal obsidian links won't work for an exported document.
This is especially useful if you want to have the citation keys be links to the your paper notes in obsidian. If you have something like this:
the latter reference won't be rendered correctly - rather you get a link with the cite key as text.