-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
Some links try to load invalid files #101
Comments
Hi @wischi-chr thanks for the detailed review. I guess we could use option 1. I don't think there is a reason why we don't use the We could switch to that, although we should allow backward compatibility. Some users will have links referring to a file in the wiki like:
So we could navigate to the link. If there is no file, try to remove suffix (like option2). |
I just tried showing an image from the local directory or embedding a link to a local directory or local .txt file in a page and nothing of this seems to work because all those files are accessed with an added .md extension. I think it would be good to allow for a list of extensions where the (local) URL is not modified and instead the file is served in the standard way. So for example if a link to an image is in a wiki file, then clicking that link would just let the browser view that file. There are actually two ways to do this:
|
Actually, what I said in the previous comment is wrong as modern browsers will not allow to link from a http(s)://localhost URL to a file:/// URL any more. So the only way to supprot this would be to recognize specific file extensions as media files and serve them with the proper mime type using the correct localhost URL |
My markdown files already have relative links because most of the time when I'm editing them I'm using VS Code and similar tools. If I click on links that reference another markdown file the extension will be added twice and the page fails to load.
for example if I have a link like this
[Some random text](OtherFile.md)
it will generate a URL that ends with/OtherFile.md
but that page than tries to load/OtherFile.md.md
Other cases would be files that seem to be supported but are not
.md
files, for example like.txt
and.ini
. Those files are listed (on the/list
pages) but when I click them the URL is generated without the extension and than the page tries to load an.md
file that doesn't exist.My guess is that originally one wanted to keep the wiki URLs clean and without extensions but that seems to break in a lot of cases.
At this point I think there would be two options to solve those issues:
/Folder/PageA
test if there really is a file without extension and open that. If there is not try to append ".md" and test if that file exists. This would allow for clean URLs but fix the issues mentioned above.I like Option 1 better and it would be the least surprising to users, but I guess there was a reason to drop the ".md" from the URLs in the first place.
The text was updated successfully, but these errors were encountered: