-
Notifications
You must be signed in to change notification settings - Fork 27
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
Inconsistent links in Preview #39
Comments
I’m on the road. Can’t test with my mobile. My guess: The wiki doesn’t know how to handle Can you please check if the following examples work as intended in both view and preview?
This maybe even a HTTP/HTML problem, since the markdown is just rendering the syntax to links. |
i have in article2, trying to view article1preview
in the saved article
in article1, viewing article1 stuffpreview
in the saved article
|
The problem is, when viewing e.g. I like the idea of having SO the only chance to fix the links in the preview is to rewrite how the links in For the attachment routing, I have no idea how to get away from |
ah that makes sense with the preview problem. about attachment routing: that was supposed to be this issue! i just mentioned the preview problem on the side because i just noticed it (i should have done that one in a short seperate issue). "inconsistent" was referring to it being inconsistent with the underlying file structure, and inconsistent with the way "normal" markdown viewers handle links. |
Please open a second issue for the attachment routing and consider the discussion in #25 |
Currently, the file structure is as follows:
attachment.xyz
for an articlearticle.md
is located inarticle/attachment.xyz
in that root directory.For linking, we have the following:
[linktext](/article)
and even[linktext](/article.md)
[linktext](/article/a/attachment.xyz)
Ideally, I would like to be able to link stuff consistently with how linking would work if I were to view the same markdown files in a text editor that can handle markdown links I made the following observations:
[linktext](./article)
and even[linktext](./article.md)
, but this is broken in preview mode.[linktext](./article/a/attachment.xyz)
, but this is broken in preview mode, whereas[linktext](./a/attachment.xyz)
works but only in preview mode while previewing the articlearticle
.[linktext](./article/attachment.xyz)
or[linktext](/article/attachment.xyz)
.(I hope that I didn't make any mistakes)
I suspect the reason for 1 (and the second part of 2) is that in preview mode, a relative path gets appended to the path of the article, which doesn't happen normally.
Also, filenames are automatically made lowercase in the underlying file structure, no matter the casing of the article name in the otterwiki viewer. I can imagine multiple reasons for this, but it might make linking stuff more confusing, since links could break when viewing the files in other markdown viewers that follow the link directly and are therefore case-sensitive. Also, where does otterwiki track how the casing is, if it can't see it in the filename? It seems weird to have extra metadata just for that.
So additionally to the preview bugs, I would personally heavily prefer it if links were made to be compatible with the file structure in a way that any other markdown viewer would handle it for relative paths.
Some thoughts:
article/a/
for each article and put attachments there? Or is that nonsensical?article
folder, and have the path name for the http request also as it currently is with/a/
in the path name, but at least have linking work with links with a relative pathname./article/attachment
. The otterwiki viewer could just handle it however it likes, as long as the linking works.I just want it to be consistent with viewing the markdown files in other settings.
The text was updated successfully, but these errors were encountered: