Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No relative path support for resource links (e.g. images/*) does allow portability across devices #883

Open
xllora opened this issue Mar 26, 2021 · 5 comments

Comments

@xllora
Copy link

xllora commented Mar 26, 2021

Problem

Resources in images can be rendered with ![](). However it requires a global path, which breaks when moving across devices. For instance if you keep your DB in GitHub you will have to clone it in the exact same spot to make the links work. (Mentioned in #724 but seems like a separate issue)

Workaround: Create a symbolic link on the top of the tree (e.g. /athens) that points to your DB tree so you can move them around without breaking.

Screenshots/Demo

image

Athens Version

Beta 60

@kchen0x
Copy link

kchen0x commented Apr 12, 2021

Looking forward the relative path feature to solve the problem.

@Sednaoui
Copy link

Sednaoui commented May 17, 2021

@xllora can you clarify further on your method and how it works?

@GitHubChrischen
Copy link

please!!!!!

@xllora
Copy link
Author

xllora commented May 22, 2021

@Sednaoui, @GitHubChrischen Nothing fancy. Just make a symbolic link (ln -s /path/to/your/db /athens) and reference ![](/athens/file_in_image_folder) on you image embeds. Do the same on the other machines. DB renders correctly on all machines.

@ksprashu
Copy link

ksprashu commented Sep 18, 2021

Symbolic link idea is good, however this breaks if you are storing the database in Google Drive. Each time the drive it mounted, it mounts as a different hash in Mac. file:///Volumes/GoogleDrive-1181345617774334419373/My Drive/_notes/
So in my case each time I reboot the mac, the links are now useless.

Also I am not sure if the Symbolic link idea will work in Windows.

Another thing is that in this workaround, the symbolic link has to be edited in each platform. If I am using Google Drive, or any other Cloud Drive to store the data, then it isn't possible to do this without manually changing this each time. I cannot do a .gitignore on a cloud drive for instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants