mozilla / extension-workshop

Firefox Extension Workshop
https://extensionworkshop.com
100 stars 133 forks source link

Cannot link to documentation title anchors #497

Open kumar303 opened 5 years ago

kumar303 commented 5 years ago

Describe the problem and steps to reproduce it:

What happened?

You cannot link to this section of the documentation.

What did you expect to happen?

MDN had an anchor icon which let you link to titles.

Anything else we should know?

caitmuenster commented 5 years ago

Thanks @kumar303. Would it be helpful if we anchor linked all of the h3s on this page?

kumar303 commented 5 years ago

Yeah, any header (h2, h3, h4, ...) should be linkable. I guess linking h1s wouldn't be so helpful but maybe.

caitmuenster commented 5 years ago

That should be doable! The h2s should already have anchors -- I'll add the h3 anchors for this week's push.

muffinresearch commented 5 years ago

Anchors weirdly seem to be on each section rather than heading. It would be good to move them to the headings, then we could more easily add some script to provide a link to the heading, which is a pretty established pattern.

That said looking at MDN I don't see any special behaviour for this either.

Getting_started_with_web-ext___Extension_Workshop
kumar303 commented 5 years ago

Also, as a bonus feature it would be fantastic if old links redirected with the same supported anchors 🍰 🎠

Example: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/web-ext_command_reference#web-ext_run

^ This used to link directly to the run command. Using find on page to locate the web-ext run section is quite difficult since it's mentioned so many times.

Another way to say this is that the new site should use the old anchor names, if that's possible.

muffinresearch commented 5 years ago

Also note, that we seem to have turned off auto heading id generation here :/ https://github.com/mozilla/extension-workshop/blob/6c83d45da0952a4e8e843b00c72409b4d03019e5/_config.yml#L38