deeplinks.js — screenshot of github.com

deeplinks.js

This is a neat little script, deeplinks.js, that enables deep linking to any text highlight on your site. I find it quite nice for static, text-heavy blogs where you want robust, short URLs for specific selections.

Visit github.com →

Questions & Answers

What is deeplinks.js?
deeplinks.js is a lightweight JavaScript library that enables users to create shareable deep links to specific text selections on a webpage. When a user selects text, the URL's fragment identifier updates, allowing them to copy and share a link that automatically highlights and scrolls the same text into view for recipients.
Who is deeplinks.js designed for?
It is primarily intended for blogs and other text-heavy websites with relatively stable content. Authors of such sites can integrate it to provide enhanced sharing capabilities for their readers.
How does deeplinks.js differ from other deep linking solutions?
deeplinks.js prioritizes plug-and-play simplicity, robust short URLs that won't break with minor content edits, and subtlety, not interfering with normal fragment links. It intentionally does not implement the WICG Text Fragment interface and is not designed for frequently-changing content like wikis.
When should I use deeplinks.js on my website?
You should use deeplinks.js on static or mostly static pages, such as blog posts, articles, or documentation, where content does not frequently change. It is not recommended for dynamic pages or those with evolving content like pagination pages, as breaking URLs is a stated concern.
What is the installation process for deeplinks.js?
To install deeplinks.js, download the latest release, extract it into your website's directory, and then include <script type="module" src="/deeplinks/deeplinks.js"></script> in your HTML. Ensure the type="module" attribute is present for it to function correctly.
in your HTML. Ensure the type=\"module\" attribute is present for it to function correctly."}}]}