Skip to content
This repository has been archived by the owner on Sep 21, 2024. It is now read-only.

Support deep links #15

Open
nichtich opened this issue Jun 4, 2021 · 2 comments
Open

Support deep links #15

nichtich opened this issue Jun 4, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@nichtich
Copy link

nichtich commented Jun 4, 2021

The issue of deep links has been brought up but not discussed yet in combination with multilinks. In short a deep link consists of

  • a reference to a document (could be given as relative path or URI)
  • a content locator to link into the document

The content locator could best be specified separated by # as URI Fragment. Note that at least (space), |, and % in URI Fragments must be escaped to allow splitting label and multiple links.

An example:

# Deep links in subtext
Links can contain content locators, given as URI Fragment. The syntax and semantic depends on document type.
For text such as subtext there is a specification:
& https://datatracker.ietf.org/doc/html/rfc5147|https://www.rfc-editor.org/rfc/rfc5147.txt RFC 5147
This link references the second and third line of a text document:
& ./document.st#line=2,3 Deep Link
@gordonbrander
Copy link
Collaborator

If we do bring in something like this, my sense is that it should follow the scroll-to-text approach https://wicg.github.io/scroll-to-text-fragment/

@gordonbrander gordonbrander added the enhancement New feature or request label Mar 20, 2022
@bburns
Copy link

bburns commented Aug 28, 2022

Yeah scroll-to-text is good -

To add a fragment directive to a URL like https://example.com, a fragment must first be appended to the URL: https://example.com#:~:text=foo.
e.g. https://example.org/#test:~:text=foo will be parsed such that the fragment is the string "test" and the fragment directive is the string "text=foo".


Could specify a search? eg #search="foo bar"


GitHub lets you reference lines and line ranges -

https://github.com/subconsciousnetwork/subtext/blob/dbbf178fe9f3480c052b461fcb1752829c9b7df9/parsers/subtext.py#L8

https://github.com/subconsciousnetwork/subtext/blob/dbbf178fe9f3480c052b461fcb1752829c9b7df9/parsers/subtext.py#L12-L16

and github renders those as transclusions.

I kind of like "line" instead of "L", but referencing lines isn't as useful as text or search anyway, e.g. if you're using a "live" link instead of a "static" one.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants