srid / emanote

Emanate a structured view of your plain-text notes
https://emanote.srid.ca
Other
819 stars 72 forks source link

Special tags not properly linked #199

Open danymat opened 3 years ago

danymat commented 3 years ago

I use Zettelkasten like Zettelkasten.de, which they use the concept of structure notes, found by following the tag ##...... Emanate seems to fetch this type of note, see below

Capture d’écran 2021-11-25 à 22 32 21

But when clicking to it (##§1) I get this link: https://notes.danielmathiot.tech/-/tags/#§1, but they are not fetched in the tag index (see here: https://notes.danielmathiot.tech/-/tags/#§1)

danymat commented 3 years ago

Just saw more of the tag index, and it seems to fetch notes with ##..., but clicking to them don't go to their list of notes

srid commented 3 years ago

Hmm, yea we have to escape that # in the URL, otherwise browser will interpret it as HTML anchors.

srid commented 3 years ago

Fix would probably go here:

https://github.com/srid/emanote/blob/f578519a0e1be836714104f9d5698923456367e3/src/Emanote/Route/SiteRoute/Type.hs#L158-L160

and

https://github.com/srid/emanote/blob/f578519a0e1be836714104f9d5698923456367e3/src/Emanote/Route/SiteRoute/Type.hs#L129-L131

srid commented 3 years ago

Just saw more of the tag index, and it seems to fetch notes with ##..., but clicking to them don't go to their list of notes

The software should do it automatically, but for now - replace # with %23 in the URL. Example: https://notes.danielmathiot.tech/-/tags/%23Zettelkasten

srid commented 3 years ago

Problem exists also in metadata.tpl

image

We are constructing tag URL manually, and that's wrong (${value} is not encoded here). Should just pass the encoded URL as template var.


By the way, in the tag index we already do this (ie. tag URLs use %23 - but the browser someone reverts it back to # when opening the URL, and fails. Dunno why).