What I’m trying to do
Hello, I’m currently trying to use Obsidian as a clean interface to edit/maintain a GitHub Wiki. I cloned the repository locally and adding, updating and deleting files has been going well thus far.
However, I struggle to optimize adding images. After some minor adjustments (more on that in a second), it is possible to add images and have them both visible in Obsidian and the GitHub wiki, but there are two things that are suboptimal:
Firstly, GitHub uses the format [[image.extension]]
to add images, while Obsidian uses ![[image.extension]]
. It is possible to render the image in both by using the obsidian syntax, but the exclamation is rendered in GitHub, which is not ideal. Is there a way around this (for example, using the GitHub syntax in Obsidian)?
Secondly, Obsidian uses the option “shortest path when possible” under options>files and links. This option does not work for GitHub, so I can either set it to “absolute path in vault” which, when copy-pasting an image into obsidian, creates the following syntax: ![[folder/subfolder/image.extension]]
. Now, absolute file paths in GitHub seem to require the format [[/folder/subfolder/image.extension]]
. Notice the ‘/’ at the beginning. Similarly, using the option “relative path to file” adds the prefix ‘…’ which GitHub does not like (it just wants a relative path without the dots).
It is pretty minor, but this means that every time I add an image, I need to remove the dots or add a forward slash. This renders the image correctly in both GitHub and obsidian. Is there a way to add the forward slash by default, or alternatively, remove the two dots? I would prefer the prior, but I would be happy with either.
Things I have tried
For the first problem, I did not find any solution. The best I found was this thread.
For the second problem I tried adding an “/” to the ‘attachment folder path’ and tried the same in some extensions that have a similar option. I also tried to find extensions that aim to fix these problems, with no success.