files_markdown icon indicating copy to clipboard operation
files_markdown copied to clipboard

Let relative links point to the file within Nextcloud

Open avanc opened this issue 7 years ago • 13 comments

Relative Mardown links like

[My Link](someFolder/document.pdf)

should point to the file. However, the path of the markdown file is not included in the URL.

avanc avatar Feb 22 '17 21:02 avanc

It would be very helpful. I need a possibility to create a link to another .md file inside NC instance. Why? So I can create a minimal documentation/wiki inside NC

artemanufrij avatar May 28 '17 17:05 artemanufrij

I'm looking for the same feature to link to another .md file.

grasph avatar Jul 09 '17 09:07 grasph

I second this feature. I would need it as well.

djibux avatar Jul 09 '17 13:07 djibux

How would the link to the file function? download the file in the browser, show the file in the files app?

icewind1991 avatar Aug 22 '17 16:08 icewind1991

The ideal thing to do would be to open the target file in preview mode, so that a wiki-like structure can be created.

pietrodn avatar Aug 22 '17 16:08 pietrodn

I confirm with @pietrod. It should be open in same view...

artemanufrij avatar Aug 22 '17 18:08 artemanufrij

In case of a .md/.txt I would open the file with the note application as proposed by @pietrodn to support multipage documents with hyperlinks. For the other file types, I would mimic the behaviour of the nextcloud file browser if that is possible. If it's not possible then I would send the file as such to the user's browser, which will download it or open it with a plugin depending on its settings and capabilities.

grasph avatar Sep 04 '17 15:09 grasph

+1. Guess it goes without saying but ../ and / should work as well.

nommaz avatar Sep 04 '17 17:09 nommaz

This would be single killer feature. Currently it is very difficult to use relative links. Even the examples from README.md do not work as I demonstrate in new issue #84

gorn avatar Mar 06 '18 21:03 gorn

This single feature would turn the markdown editor into a Wiki. That would be great.

frankgerhardt avatar Sep 25 '19 12:09 frankgerhardt

This would be a killer feature for my use case (which is to import 1000+ of markdown files into a Nextcloud).

Looking forward to this feature!

Duskstrider avatar Jul 04 '22 03:07 Duskstrider

I find myself wishing for this yet again and hence re-visiting this issue in the hope that something might have changed...

Puzzled: I was assuming there was a technical reason for it, owing to the way that NC uses query parameters and file IDs rather than paths.

But re-reading #84, it appears that wiki-style relative path links to images and videos work. I've checked that images work on my NC instance, they do. But links to plain documents or directories do not, unless you use the in-editor process of selecting text, clicking an option on the pop-up which appears to link to a file, then selecting the file. But this results in a link with the file= query parameter and the right file ID. This kind of link is very specific to an instance of NextCloud, so not portable to other instances, yet alone something like GitHub. It's also very hard for any human to create these links outside the editor - when editing on a synchronised file, for example.

Addition of these relative links would also make it a whole lot easier for a static website to be generated from a NextCloud folder tree. Currently, any generator needs to have intimate knowledge of the NextCloud's file and directory index numbering. With relative links, a very simple script could do it.

Likewise, importing markdown text from GitHub would then just work. As it is, all links need to be translated into Nextcloud links - no mean feat.

All of these seem quite compelling reasons to want this feature. So I wonder if the issue can be resolved in the same way it is for images and video files?

If not, can anyone explain what the sticking points preventing this from being implemented actually are?

wu-lee avatar Feb 03 '23 11:02 wu-lee

I'd love this feature so I could edit my wiki pages from wherever I can get to my NextCloud instance. In the mean time, I'm stuck with syncing my Nextcloud files locally and then editing the files with emacs. Don't get me wrong, emacs has a great markdown mode that creates beautiful tables and even renders PDF files somehow, but it's not as convenient as pointing a browser at my NextCloud.

phippodoplis avatar Oct 13 '23 14:10 phippodoplis