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

Feature Request: Enable conversion for the whole vault (into new secondary vault) #1

Open phibr0 opened 3 years ago

phibr0 commented 3 years ago

I think the title says it all! A Feature which enables the user to "export" the whole vault with mdlinks instead of the default wikilinks. By doing that the user will be able to use something like github pages to host their knowledge-base.

agathauy commented 3 years ago

Ohhhh that indeed an interesting use case! I'm interested in exporting stuff to Github pages as well. Would update on Discord when I get around doing this :D

I think the next thing I would do first is the per page implementation. And then that one 👍

phibr0 commented 3 years ago

hm.. i just found out that the plugin doesnt add the folder in front of the mdlink.. That means it still wouldn't work with other software like Github Pages. Would it be possible to get that information too? I mean obsidian has it, i just dont know if a plugin can get access to it..

If all notes are in the root directory it works, but i use multiple sub-directories

agathauy commented 3 years ago

@phibr0 it doesn't? It does on mine... Would you mind sending an example text?

agathauy commented 3 years ago

Ah got what you're saying. What setting is it in Obsidian that allows you to just use a "filename" on a Wikilink without a path? I use relative file paths for example, and before, absolute paths. I use sub-vaults as well.

I think it's with "Shortest path available" right? But I just can't seem to trigger it right now for some reason. A folder path still appends to my links.

phibr0 commented 3 years ago

What i mean is that for example i have this vault: root.md in the root vault folder and /sub/sub.md so another md file in a subdirectory

If i want to have a mdlink in the root file shouldnt the link be something like [](./sub/sub.md)?

agathauy commented 3 years ago

@phibr0 Hmm Obsidian does load relative files like [](sub/sub.md) still doesn't it? Although tbh it wasn't an issue with Github Wiki, Gitlab Wiki, Zettlr, VS Code Preview and Pandoc. So I think this is ok.

For Obsidian, it appears to only change the file paths if for example sub.md accesses root.md like [](../root.md)

Personally right now I think I shouldn't handle this yet since vault configurations for paths tend to be different for different people. Especially since some changed the settings after already using an existing setting (Obsidian doesn't change already existing absolute paths to relative paths for example). Might be best for us to manually change this via Replace All for now with a code editor e.g. VS Code, or other replace all scripts manually instead of devving a more intricate solution.

phibr0 commented 3 years ago

Will it then work with GH Pages?