Can't reference other notes through relative links
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 738
- Forks
- 162
- Avg merge
- 6h 2m
- Merged PRs (30d)
- 35
Description
Steps to reproduce
- Create a Markdown file named
index.mdwith e.g. the following content
# Index
- [Topic A](./A.md)
-
Create a file named
A.mdin the same directory -
Try and click on the link in
index.md
Expected behaviour
The note object linked to A.md should be opened
Actual behaviour
The URL is resolved with respect to the current note ID prefix, so the redirect goes to /apps/notes/note/A.md, which doesn't exist.
This is particularly relevant when using something like e.g. vimwiki (or anything that allows you to manage Wiki-like notes in Markdown format). Relative URLs in these context are usually resolved to file names, but Nextcloud Notes works with internal note IDs instead.
Would it be possible to add an intermediate resolver that checks if the requested URL points to a file indexed as a note, and in that case redirect the user to the right URL?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the link from index.md to A.md, then trace how relative Markdown URLs are resolved and how indexed note filenames map to internal note IDs. Done means a same-directory link opens the note represented by A.md instead of redirecting to the unresolved /apps/notes/note/A.md URL.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100