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

Unable to open relative images / resources when md file is not in current dir #52

Closed
jamescooke opened this issue May 27, 2023 · 4 comments · Fixed by #53
Closed

Unable to open relative images / resources when md file is not in current dir #52

jamescooke opened this issue May 27, 2023 · 4 comments · Fixed by #53
Assignees
Labels
bug Something isn't working

Comments

@jamescooke
Copy link

Current behaviour

Frogmouth is not able to open resources relative to the current markdown file when that is not in the current directory. For example, for a file and image in a doc directory:

mkdir doc
curl https://placekitten.com/100/100 > doc/cat.png
cat > doc/README.md
# Hello

[Some image](cat.png)
frogmouth doc/README.md

Clicking on the "Some image" link brings up a "Does not exist" box:

Screenshot from 2023-05-27 23-19-45

Expected behaviour

Browser window opens with the image.

This behaviour happens when frogmouth runs in the doc directory, so it's able to open files when they're in the current dir.

cd doc
frogmouth README.md

However, when opening files by passing a file in a different directory, or using the navigation to load a file in an alternate directory, relative paths from markdown no longer work.

@davep davep self-assigned this May 28, 2023
@davep davep added the bug Something isn't working label May 28, 2023
@davep
Copy link
Contributor

davep commented May 28, 2023

Good catch! And thank you for the very clear report/reproduction steps too.

Bonus points for including kittens!

@davep
Copy link
Contributor

davep commented May 28, 2023

#53 should address this (looking good testing here). Will be in the next release.

Thanks again for raising this.

@jamescooke
Copy link
Author

Thanks @davep - I've installed main and got the relatively linked images working in my local docs now 🎉

@davep
Copy link
Contributor

davep commented May 28, 2023

Thanks for confirming. 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants