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

Handle relative paths in Markdown export #846

Closed
laurent22 opened this issue Oct 4, 2018 · 4 comments
Closed

Handle relative paths in Markdown export #846

laurent22 opened this issue Oct 4, 2018 · 4 comments
Labels
enhancement Feature requests and code enhancements

Comments

@laurent22
Copy link
Owner

https://discourse.joplin.cozic.net/t/display-images-correctly-with-markdown-export/706/7

@laurent22 laurent22 added enhancement Feature requests and code enhancements essential labels Oct 4, 2018
@GIT-STATA
Copy link

Hi laurent22,

thanks so much for your great work! I really appreciate all of it!

Right now I do not find any way for using a absolute or relative path, that is portable between Mac, Linux or Windows. It would be great to even implement that possibility in Joplin!

It would be great to enhance this feature that way, that you could use a relative path in the first place to write md files in Joplin as well! In editors like ATOM or SUBLIME TEXT you already can use a relative path for pictures or file attachments. That way you could keep your directory infrastructure as well as your 'naming conventions'.

For example, we use
![Picture-Definition-Year-Month](../relative_path/Illustrations/YEAR/MONTH/some_pic.jpg)

Many thanks again!

@forcewake
Copy link

Yep, @laurent22 thanks a lot!

Regarding the relative paths in the export.
In the current implementation there is only one issue - find the way to determine the level of _resources folder, due to notebooks hierarchy
image
or change the way how the images (or resources in general) are stored.

Second option can break some compatibility for users which are already rely on specific folder structure.

@laurent22
Copy link
Owner Author

@GIT-STATA, this is unlikely to be implemented since the recommended way to include a file is to attach it rather than link to a local file (that way it is synced with the notes). If you want to link to a local file you can already do so using the file:/// protocol. You would just need to make sure that all your devices have the same path structure, using symlinks if necessary.

@GIT-STATA
Copy link

@laurent22
Thanks a lot! I really appreciate all of your efforts!

Still if I do use the file:/// protocol I can't use a local path
like that one:

C:\Program Files\YEAR\M.01\DAY.jpg

A fix for #906 was merged!
I guess, that should solve those problems?

Thanks again!

@lock lock bot locked and limited conversation to collaborators Oct 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Feature requests and code enhancements
Projects
None yet
Development

No branches or pull requests

3 participants