obsidian-export icon indicating copy to clipboard operation
obsidian-export copied to clipboard

feature request: add a flag to specify path prefix for wikilinks

Open khimaros opened this issue 2 years ago • 2 comments

proposed command line usage:

$ obsidian-export --wikilink-prefix="/posts/" /path/to/input/ /path/to/output/

for given input markdown:

[[example]]

generated markdown would be:

[example](/posts/example.md)

this would be another solution to the hugo relative link problem and would generally allow more flexibility for people working with alternative publishing mechanisms.

main code touch points seem to be be https://github.com/zoni/obsidian-export/blob/main/src/lib.rs#L650

khimaros avatar Jan 12 '23 23:01 khimaros

i've prepared a draft branch which implements this feature request:

https://github.com/khimaros/obsidian-export/tree/wikilink-prefix

it is currently lacking tests which cover this use case, but all existing tests are passing.

please let me know if there's a better approach.

khimaros avatar Jan 13 '23 01:01 khimaros