web-platform-dx / web-features-explorer

A visualization of the web-features data
https://web-platform-dx.github.io/web-features-explorer/
Apache License 2.0
28 stars 10 forks source link

Add web developer friendly links to MDN #32

Open captainbrosset opened 4 days ago

captainbrosset commented 4 days ago

Help wanted: help me complete the mapping between web-features and MDN URLs

The features listed in the web-features repository don't come with MDN URLs. However, linking web-features to MDN URLs is useful for several things:

The mapping is, for now, maintained in this file: https://github.com/web-platform-dx/web-features-explorer/blob/main/mdnDocsOverrides.json

There are still a couple hundred features left to be mapped. Here's how the mapping works:

{
  "<web-feature-id>": [
    "<MDN-page-slug>"
  ]
}

Each feature points to one or more MDN URL. Each MDN URL is partial, only the slug is needed, not the root URL. Here's an example:

{
  "aborting": [
    "Web/API/AbortController",
    "Web/API/AbortSignal"
  ]
}

The root URL is https://developer.mozilla.org/en-US/docs/, so the two slugs above end up pointing to: https://developer.mozilla.org/en-US/docs/Web/API/AbortController and https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal.

On the web-features-explorer website, currently, the mapping is used to display links as follows:

image

See this page live here: https://web-platform-dx.github.io/web-features-explorer/features/aborting/

jsnkuhn commented 5 hours ago

If this is really as straightforward as it seems I'll give this some time. Searching for and then copy/pasting links into the .json is all you are really looking for here?