link syntax

From IndieWeb


link syntax is a way of expressing a hyperlink with a URL and link text, in a plain text document, such as Markdown, MediaWiki syntax, etc.

Examples

Markdown

[linktext](URL)

Markdown criticism

  • Not memorable
    • Aaron Parecki “I can barely ever remember the order of the markdown [] vs ()”
      “url first? text first? url goes in the round ones or the square ones?” (2016-04-27 IRC)
    • gRegor Morrill “I can never remember the right way to do links on github (whatever flavor of MD that is)” (2016-04-27 IRC)
    • @evilgaywitch “Only so many times you can forget how the fuck to do a link [in Markdown] before you just use raw HTML” (2014-09-17)

MediaWiki

[externalURL linktext]
[[wikipagepath|linktext]]

MediaWiki criticism

  • Hard to remember
    • bear “ is it [] or () or {} and is the text first or last”

Usability considerations

  • URL-first is better
    • gRegor Morrill “URL-first makes sense to me.”
      “Link text is optional, so makes sense to come after the link.”
    • Aaron Parecki “URL first makes sense cause it's the closest to the HTML I would write instead”
    • Kevin Marks “url[space]link text is easy to remember because you can't have spaces in URLs”
    • counterpoint: bear “url first to me is wrong because i'm writing text and *then* want to have that text get a link”
      • Tantek Çelik tends to agree. “I chose linktext before URL in my syntax, because the linktext is what a user is reading first and foremost more than the URL it links to”

See Also