protesilaos / denote

Simple notes for Emacs with an efficient file-naming scheme
https://protesilaos.com/emacs/denote
GNU General Public License v3.0
512 stars 54 forks source link

The “denote” links in markdown exported files do not work #334

Open maikol-solis opened 5 months ago

maikol-solis commented 5 months ago

Hi!

Basically, I have this problem, I have searched for a solution, but I haven't found anything relevant.

Imagine you have a markdown file with title My first file and signature 0a with the link

[0b  My second file](denote:20240426T141754)

After exporting the first file with pandoc, I got this in the html

<a href="denote:20240426T141754" target="_blank" rel="noopener">0b My second file</a>

of course, this link doesn't work. What I'm expecting is to have something like

<a href="20240426T141754==0b--my-second-file.html">0b My second file</a>

My solution is to use #327 to change every link to classic markdown everywhere.

However, I don't know if this has any side effects on the backlink system or any denote's features.

Best.

protesilaos commented 5 months ago

From: Maikol Solís @.***> Date: Sat, 27 Apr 2024 10:28:03 -0700

Hi!

Hello and thank you for taking the time to report this!

Basically, I have this problem, I have searched for a solution, but I haven't found anything relevant.

I think this and the other issue you brought up make it clear that we need a denote-markdown-extras.el to provide a few more tools for people who use Denote with Markdown.

Imagine you have a markdown file with title My first file and signature 0a with the link

[0b  My second file](denote:20240426T141754)

After exporting the first file with pandoc, I got this in the html

<a href="denote:20240426T141754" target="_blank" rel="noopener">0b My second file</a>

of course, this link doesn't work. What I'm expecting is to have something like

The reason here is that Pandoc does not understand 'denote:' links, which is to be expected.

<a href="20240426T141754==0b--my-second-file.html">0b My second file</a>

My solution is to use #327 to change every link to classic markdown everywhere.

Yes, converting the links would work for the exported file.

However, I don't know if this has any side effects on the backlink system or any denote's features.

I have not tested #327 yet---will do it as soon as possible.

I recently made some unrelated changes to the backlinking mechanism and think either it will work or it is easy to make it work.

-- Protesilaos Stavrou https://protesilaos.com

maikol-solis commented 5 months ago

Thanks. I'm willing to help test the new features for markdown files whenever you want.

Best.