stucco-software / octothorp.es

Hashtags for Websites
https://octothorp.es
6 stars 0 forks source link

Link references and Wikipedia style links #1

Open nimdaghlian opened 6 months ago

nimdaghlian commented 6 months ago

As an editor on a registered site, I want to have access to a small JS library that allows me to use markdown style link references to create Octothorpes pointing to the current page.

Link reference usage:

[link text][#term]

shorthand: [[(#)term]]

Example

This page is part of the [cozyweb webring][#cozyweb]. Click to find out more.

The script should replace [cozyweb webring](#cozyweb) with <a href="https://octothorp.es/~/cozyWeb?/[current page path]">cozyweb webring</a> and perform the necessary request to register the current url as the appropriate octothorp on the server.

Typing This page is part of the [[#cozyweb]]. Click to find out more. should resolve to <a href="https://octothorp.es/~/cozyWeb?/[current page path]">#cozyweb</a> -- ie same thing, using the octothorpe term as the link text.

nimdaghlian commented 6 months ago

For consideration: adding a flag to allow / disallow normal roam/wiki style links, ie [[cozyweb]] instead of [[#cozyweb]]. This would be to add some control over potential collisions with other services that would be trying to parse the link. My gut feeling is that it should be off by default, requiring the usage of the # but you should be able to set a flag to turn it on if you know you won't have collisions.

nimdaghlian commented 6 months ago

on hold until #2 is closed

nikolaswise commented 6 months ago

Okay #2 is done we can think about this again

nimdaghlian commented 5 months ago

This has been demo'd at demo.ideastore.dev, with a slightly different syntax than proposed here. Agreement is that this is extra polish beyond what tag.js should provide, and would be better a) provided by platform devs on a per-platform basis or b) included as part of an SDK if octothorpes is going to provide any such thing at all

nimdaghlian commented 2 weeks ago

Leaving open for future discussion as something like an SDK develops.