Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve MDN linking #354

Closed
andyearnshaw opened this issue Jun 17, 2015 · 2 comments
Closed

Improve MDN linking #354

andyearnshaw opened this issue Jun 17, 2015 · 2 comments
Milestone

Comments

@andyearnshaw
Copy link
Contributor

Currently, only a handful of natives are linked to the MDN documentation. With the advent of ES6 and the rapid pace that new APIs are specced for the web platform, the list is lacking, but it may be possible to extend this to include almost everything, including new APIs that are added regularly.

Kuma (MDN's wiki platform) is able to return JSON content for pages, including a list of subpages. For example, adding $children to the JavaScript Reference/Global Objects URL will return all the native JavaScript objects available in the global scope in a parseable format:

{
  "locale": "en-US",
  "url": "/en-US/docs/Web/JavaScript/Reference/Global_Objects",
  "subpages": [
  {
    "locale": "en-US",
    "url": "/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array",
    "subpages": [],
    "slug": "Web/JavaScript/Reference/Global_Objects/Array",
    "title": "Array"
  },
  {
    "locale": "en-US",
    "url": "/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer",
    "subpages": [],
    "slug": "Web/JavaScript/Reference/Global_Objects/ArrayBuffer",
    "title": "ArrayBuffer"
  },
  {
    "locale": "en-US",
    "url": "/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean",
    "subpages": [],
    "slug": "Web/JavaScript/Reference/Global_Objects/Boolean",
    "title": "Boolean"
  },
  ...
}

Likewise, the Web API Interface index can be obtained in the same manner. Therefore, it should be possible to generate these links automatically, albeit with an addition compilation time cost.

@okuryu
Copy link
Member

okuryu commented Jun 17, 2015

Thanks for your suggestion! I didn't know about the JSON data by MDN. I'd like to investigate for this.

@okuryu
Copy link
Member

okuryu commented Jul 7, 2015

Fixed in #363.

@okuryu okuryu closed this as completed Jul 7, 2015
@okuryu okuryu added this to the v0.8.0 milestone Jul 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants