question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make headlines permalink-able

See original GitHub issue

Let’s do whatever it takes to make it performant, non-obtrusive, intuitive, and accessible to link to headings. In today’s master the only way you can make a link to a heading is if you scroll up and find the TOC in the sidebar (on mobile it’s much more hidden).

Note! I think we should still keep the TOC tables in the sidebar.

There are two potential ways to do permalink-able headings. The way npmjs.com and github.com does READMES that there’s a little “chain icon” that appears to the left (or to the right) when you hover over the link. Screen Shot 2020-07-31 at 7 27 32 AM

Another approach is to simply turn every heading into a “self-link” like docs.github.com does. Example page The headings are basically like this:

<h3 id="enabling-github-dependabot-version-updates-for-actions">
  <a href="#enabling-github-dependabot-version-updates-for-actions">
    Enabling GitHub Dependabot version updates for actions</a></h3>

The advantages of that are that it requires 0 CSS and 0 JS to make it happen, and it works without a mouse device.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
peterbecommented, Jul 31, 2020

Whatever we build, let’s not build a thing that requires some client-side JavaScript to mutate the DOM based on some query selectors.

1reaction
peterbecommented, Jul 31, 2020

I definitely favor the way docs.github.com does it and I’m confident it can be done pretty easily with Yari since we control the HTML as a DOM (with cheerio).

I think it’s up to @schalkneethling and @malqinneh to decide and perhaps they prefer to push this out to the design system process.

But it might be worth it for the dev team (hi @escattone and @Gregoor ) to consider throwing this in now as an HTML thing and then mdn-minimalist can style it.

What do you think?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Custom Output Formats - Hugo
This page describes how to properly configure your site with the media types and output formats, as well as where to create your...
Read more >
You've probably never heard of this creepy genealogy site ...
There are many “people search” sites and data brokers out there, like Spokeo, or Intelius, that also know a lot about you. This...
Read more >
SnapStream's founder on how 'The Daily Show' uses ... - Poynter
Agrawal, founder and CEO of SnapStream, was sitting in the first row ... (which is what he calls “a DVR for business,”) how...
Read more >
ProPublica Wins Two 'Best of Digital Design' Awards
The Society of News Design honored ProPublica with two awards for its news applications ... Granular, permalinkable data, clear hierarchies, ...
Read more >
all the news that's fit to print (but not find) – andromeda yelton
First you go to the library home page, then you click on the “Research & Information” tab, then you log in, then you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found