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

link to local file with absolute path #647

Open
juneleung opened this issue Sep 2, 2024 · 2 comments
Open

link to local file with absolute path #647

juneleung opened this issue Sep 2, 2024 · 2 comments

Comments

@juneleung
Copy link

juneleung commented Sep 2, 2024

Thanks for your work and I faced an issue when using the code.
I wanna to link to a local file path with an absolute file, like /User/Apple/xxx.md, I tried [MD](/User/Apple/xxx.md) but seems the final result generated is http://localhost:1313/Users/Apple/xxx.md, is obvious not a right path.
How can I add a hyperlink to local file with an abs path? cause some files hard to use a relative path when on another stroage disk. Thanks

@alex-shpak
Copy link
Owner

Hi!
The path starting with / will be automatically treated as root of site
Try [Link](file:///{path}) instead

@juneleung
Copy link
Author

juneleung commented Sep 2, 2024

Hello,
I tried the following:

[pdf](file:///{/Users/Apple/Desktop/motion.pdf}) 
[pdf](file:////Users/Apple/Desktop/motion.pdf) 

but it seems not to work, though it looks like a link, but can't be clicked.
Screenshot 2024-09-03 at 01 20 30

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

2 participants