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

Links ignore folders and are treated differently depending on using ()[markdown] or [[wikilink]] notation #333

Open
thaihugo opened this issue Jul 15, 2024 · 1 comment

Comments

@thaihugo
Copy link

Hello,

I'm trying to make sense with images linking in my markdown documents, as it seems different to my Obsidian setup on Linux and Markor setup on Android.

I've added my Markdown Base folder as a local notebook, and I can use all functions once I cd in my folder.

My markdown document database is organized in multiples subfolders:

Markdown Base Folder
|_Bookmarks
   |_Assets
   |   |_Image1.jpg
   |_Web.bookmark.md

If I want to link Image1.jpg, I would add this link on Web.bookmark.md:

![](Assets/Image1.jpg)

This would show the image on Obsidian and Markor, but not on nb

nb browse Bookmarks/ --gui

If I link with the subfolder:

![](Bookmarks/Assets/Image1.jpg)

It would work in Obsidian and nb but not Markor. I also feel Obsidian is more accepting because this is not a relative path to the document but a relative path to the root folder, so I'm not sure if it's proper.

Of course, if all documents are at the root folder, all will work, but then I loose sub folder organization.

My question is : how can I setup my links so they can be seen as relative by all 3 programs, or how can I make nb to add automaticaly the subfolder name to links inside a md document?

Thanks a lot for your time and help

@thaihugo thaihugo changed the title Image link relative path with subfolders does not seem compatible with other Markdown tools Links ignore folders and are treated differently depending on using ![](markdown) or [[wikilink]] notation Jul 19, 2024
@thaihugo
Copy link
Author

Looking more deeply into the problem, I can see this two different links are converted differently:
(Test link)[Web.Bookmark.md]
[[Web.Bookmark.md]]

The first one gives a 404 error if it is not in the base notebook.
The second one has the name of the notebook added automatically by the browser function and works.

It seems it boils down to the way the nb browser function sees the root folder of the documents itś serving. It seems it does not consider himself relative to the subfolder the document is in but it will only serve pages when a notebook name can be plugged in?

@thaihugo thaihugo changed the title Links ignore folders and are treated differently depending on using ![](markdown) or [[wikilink]] notation Links ignore folders and are treated differently depending on using ()[markdown] or [[wikilink]] notation Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant