-
-
Notifications
You must be signed in to change notification settings - Fork 148
More convenient links #59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I see this is a limitation of mmark :/ I would support switching to pandoc, because it would allow so much more stuff like syntax highlighting, math or latex. |
Having just Syntax highlighting is already supported by mmark/neuron. See example. You need to include the language name as the first thing in the code fence (see source for that example). Math support was added in this PR. And I'm not sure how you plan to use latex in a Zettelkasten. I feel ambivalent about switching to Pandoc; it will require some thought. MMark is just simpler to deal with. But if it proves to be too restrictive, and Pandoc is not too complex to use, then it may be worth considering. |
Oh, I had no idea neuron supported highlighting and maths, that's quite cool ! FWIW I've used Pandoc to parse markdown before and found it relatively straightforward. |
Interesting, I didn't know about the angle brackets.
Yea, I'd be open to that. The exact format will have to be decided first. The ID in "z://20200101" is currently ignored by Neuron, which requires the ID to be in link text. So it is more straightforward to support But in general I wonder if neuron should support |
One idea is to use a single protocol,
And then have |
Yeah, looks nice! The main issue I have is the extra keystrokes required. Can we bikeshed shorter links? E.g.
In fact we don't need
Unless you plan other things than links and queries |
By the way, syntax highlighting is now documented here: https://neuron.srid.ca/2013702.html And mathjax here: https://neuron.srid.ca/2013701.html |
I don't like it very much, too many special characters for simple functionality: It's hard to remember. Not everyone is a web developer and is used to the syntax. And third, the URL doesn't make much sense: Why not use just relative URLs that map to the http URL? From a user's perspective I don't see any reason for the
(... the markdown syntax for links is really stupid. The rest of markdown too ;) |
@streaps It is an URI ("a string of characters that unambiguously identifies a particular resource"), not an URL, which is just a form of URI. URIs won't be going away from neuron; I think they are vital in defining simple and clear links to resources (zettels). Aliases to them would be introduced so that users won't have to type in the full URI. Here's what I've tentatively come up with, using some ideas from above: URI spec:
Aliases:
Nothing is finalized, yet. Note that:
|
Although URN might be more suitable.
|
I don't think that any of the examples is correct (but I could be wrong)
In the context of markdown pages, which are rendered to html and served by a web server, the most intuitive thing is to use relative URLs. On wikipedia you don't put |
That's quite nice actually; the wikipedia example is good. Imagine instead of serving a zettel at |
I had a chance to look more into this. Some thoughts:
That said, URIs would be used internally, and the alias syntax must have a 1-to-1 mapping with URI representation. So the revised proposal would be:
This would map to the following URIs (which are also allowed in Markdown, but would rarely be needed):
The URI for a general search would look like |
I've started implementing at least |
I'm close to finalizing the proposal. I think the scheme below will facilitate a as clear as possible implementation with the new query type #117:
Anchor can be used for annotation (ignored by neuron):
Connection type can be specified using query flag:
And it goes without saying that regular links (aside from the henceforth legacy links) won't be supported. For example, the following won't be handled:
We require the URI to match the link text, before processing them. There is one thing pending on this proposal. That is the link theme query params need to be normalized, in light of the new query types. |
Looks good! I have one objection about using anchors for annotations however: they make sense when the link zettel has markdown headers. For example: https://neuron.zettel.page/2011501.html#test-your-install points to a particular section of the zettel. |
Is there editor integration for following links in the markdown? With So in addition to |
@michelk Not a bad idea. I suppose we could support that as well (though not document it predominantly, but only as a footnote).
I use @felko's https://github.com/felko/zettel-mode with Doom Emacs (that uses VIM keybindings in Emacs). It has a function to follow zettel links, but it does more (insert zettel links, create new zettel, insert tags, open rib generated page, etc.) |
Moved to #148
|
The proposal has been implemented (except for annotations) in the |
... and documented. |
Migration script to switch to new style links: https://gist.github.com/felko/e8bac68ece2f8a3f52e954fe5be78952. Usage: |
If anyone is wondering what the new links look like, on Emacs (with Image from https://neuron.zettel.page/2011406.html |
Has anyone already setup a configuration for vim to search and insert zettel-IDs? |
@michelk In case you hadn't seen it yet: https://github.com/ihsanturk/neuron.vim |
Linking between zettels is arguably one of the main features of the method, yet the syntax is quite clunky:
[20200101](z://)
(especially when typing on a phone). Would it be possible to make this more convenient ? For example, having just[20200101]
seems quite markdown-y, since markdown supports link reference definitions.The text was updated successfully, but these errors were encountered: