-
Notifications
You must be signed in to change notification settings - Fork 7
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
For missing /subdir/index.md fall back to /subdir.md if it exists? #16
Comments
I think, moving |
@til-schneider Do you fancy any particular way to implement this? I'd suggest showing a different placeholder text than "this page doesn't exist":
And when you click the button, well, it'll move the file :) |
I would rather just move the file and hide this technical detail to the user. So the user just sees the moved page. |
Oh, wait! Doesn't this break all the relative links? If yes, we should probably keep the |
Right -- It would break any link where the optional file suffix So: if |
Yes: If |
I'm still not quite sure whether relative links are an issue or not... In the end both |
Relative links are resolved as absolute paths before the file is read when the GET request is being made, so at that point we should be able to have a canonical way to make this decision. I played around with the code a bite (see PR's :)) and will be taking a jab at implementing this next week or so. |
When a less tech-savvy friend for whom I set up Slim Wiki encountered how subfolders work, he was confused by the fact that old pages were forgotten. Here's a procedure description so you see what I mean:
/subdir
and edit it. This creates/subdir.md
(in the articles directory of Slim Wiki of course)/subdir
into an overview with links to/subdir/detail
. Follow that link and create that page. This creates/subdir/detail.md
./subdir
-- it says the page doesn't exist.The file tree at that point is:
So when you browse
/subdir
, Slim Wiki says the file is missing because it's looking for/subdir/index.md
in the file system.In that case, I would suggest to either fall-back to the overshadowed
/subdir.md
, or recognize this special case and offer to move/subdir.md
to/subdir/index.md
with the click of a button. The latter is not as magical, but probably more robust because the editor doesn't need to change file lookup routines.To the end user, it appears that the content at
/subdir
is lost. But you have to change the file into a directory index file and then everything's alright. At the moment, though, this is rather panic inducing for organically growing wiki users :)@til-schneider What do you think about this?
The text was updated successfully, but these errors were encountered: