agathauy / wikilinks-to-mdlinks-obsidian

An Obsidian md plugin which allows for the conversion of individually selected wikilinks to markdown links, and vice versa.
105 stars 13 forks source link

problem with paths links #3

Open StefanoCecere opened 3 years ago

StefanoCecere commented 3 years ago

i have an images in subdirectory img/

![[my_image.png]] show the image bit the plugin converts the link to ![my_image.png](my_image.png) which doesn't work, should be ![my_image.png](img/my_image.png)

the same works with notes links.. if they are in different directories

Nebucatnetzer commented 3 years ago

In addition it would be nice if it would respect the settings set in "Files and Links". E.g. relative or absolute paths to the file.

agathauy commented 3 years ago

Will see about how it could go on about doing this. Will come back for a next update to this plugin soon. @Nebucatnetzer

@StefanoCecere hmm intriguing! In Obsidian that works with mine, granted that images have unique filenames. Last I tried, it's the same way if using the Wikilinks [[]] format and the file name isn't unique, Obsidian simply can't find the file. Will see about how to go on about seeing folders as well instead of just parsing text to do this.

ghost commented 3 years ago

Hi - thanks for the work here. Please would it be possible to have a setting to allow the user to choose how the link is formatted? Relevant to the file path for example as Stefano suggested above? I keep my images in an assets folder so ideally the [[image]] link should be converted to [image](..assets/image) for it to render properly in other note-taking apps such as Logseq. I would like this setting to be seperate to that within the usual Obsidian 'Files and Settings' menu, so that I can continue to use Wikilinks with the shortest path by default, but have this plugin have the switch to markdown links using relative file locations for attachments specifically. Hope this makes sense!

tsbertalan commented 1 year ago

I think this counts as a bug--it's understood that wikilinks should be resolved by search, but the assumption is that "true" links should be either relative or absolute. It could be an additional preference as the ghost above me suggests, or it could try to follow the existing "Files & Links > New Link Format". #8 seems like a duplicate of this, although it seems to have a better handle on what the actual bug is.