requarks / wiki-v1

Legacy version (1.x) of Wiki.js
https://wiki.js.org
GNU Affero General Public License v3.0
101 stars 75 forks source link

Implement proper link rewriting (with file extensions) #162

Closed marianhlavac closed 3 years ago

marianhlavac commented 5 years ago

Current behaviour of links are not compatible with common Markdown renderers (not even with the one on GitHub).

For offering seamless experience compatible with other Markdown renderers, so we can read the wiki directly from the Git repo, as you're stating on your homepage:

Your content is therefore safe and readable directly from your Git repository.

the compatibility should be ensured. I find this as a serious bug.

Actual behavior

Links with extensions are incorrectly redirected to a non-existing page.

Directory structure:

folder1
  \_  file.md
index.md

index.md

[link](folder1/file.md)

The link in index.md leads to 404 (trying to open file filemd.md). Only [link](folder1/file) works, which is incorrect link syntax.

Expected behavior

The link in index.md should lead to folder1/file.md instead of folder1/filemd.md.