nextcloud / nextcloud/notes

Can't reference other notes through relative links

Open
#1,524 6 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request needs discussion
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.md with e.g. the following content
# Index

- [Topic A](./A.md)
  • Create a file named A.md in 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.