Slashlinks

Here is a weird idea… slashlinks! The hashtag of links!

Slashlinks RFC
https://github.com/gordonbrander/subtext/blob/slashlink/rfcs/2021-10-07-slashlinks.md

A /slashlink is a shortcut for linking to a local note that works like a #hashtag or @mention.

I’ve been playing with slashlinks in my latest Subconscious prototypes, and I like how simple they make it to reference other notes.

More examples of slashlinks:

Here is a /slashlink in some text.

A few more:

/evolution
/requisite-variety
/DesignPatterns
/journal/2021-10-09

The gist is a slash, followed by any sequence of letters, numbers, dashes, underscores, and slashes. Slashlinks can't include spaces. It is considered good practice to use dashes - instead. Also, slashlinks are case-insensitive so /Evolution and /evolution reference the same thing. Feel free to write whatever looks better to you.

Slashlinks are something I’m experimenting with as part of Subtext, a simple markup language for note-taking. Subtext aims to be barely there. Just the tiniest bit of structure on top of plain text.

  • Subtext is for note-taking (not publishing or presentation).

  • Subtext represents block-oriented documents as line-oriented markup.

  • Subtext is simple to write, simple to read, simple to parse.

One thing I like about slashlinks is that we’ve seen similar markup like #hashtags and @mentions gain popular acceptance in products like Twitter, Instagram, Slack, Microsoft Teams, Discord, etc. They are so simple that writing them feels more like writing a phone number, and less like writing code.

The simplicity and uniformity of slashlinks has other benefits:

  • You can search for a /slashlink with Spotlight or grep, and your search results will essentially be a list of backlinks.

  • Slashlinks can be used as a slug, ID, or primary key in a database.

  • It is unambiguous what resource you are referencing.

  • Parsing slashlinks can be done with a simple regular expression.

The Slashlink RFC also introduces a simple markup for linking URLs… no markup! Subtext will detect any http URLs, and automatically link them.

Here's a url https://example.com.

For exotic protocols, like ipfs:, dat:, or doi:, you can wrap the URL in angle brackets.

An unusual URL <ipfs://asdasdfasdfasdfasdfasdf>.

This just feels right to me.

I’m test-driving this iteration of Subtext in Subconscious prototypes right now, and I think I like it? It makes note-taking feel like Twitter.