freeCodeCamp / devdocs

API Documentation Browser
https://devdocs.io
Mozilla Public License 2.0
35.09k stars 2.34k forks source link

FR: add canonical site, icon, and aliases to `docs.json` #2210

Open chrisgrieser opened 5 months ago

chrisgrieser commented 5 months ago

Feature request

Add some more information to the docs.json, such as the original site, link to the (fav)icon, and aliases.

Summary

The docs.json is very useful to query devdocs for which sites are available, and I am using it for a plugin I wrote for Alfred. Adding some more information such as aliases or icons would make the json even more useful.

Examples

  {
    "name": "Python",
    "slug": "python~3.12",
    "alias": "py",
    "type": "python",
    "links": {
      "home": "https://www.python.org/",
      "code": "https://github.com/python/cpython",
      "canonical": "https://devdocs.io/python~3.12/reference/%s"
    },
   "icon": "https://raw.githubusercontent.com/freeCodeCamp/devdocs/main/public/icons/docs/python/16%402x.png",
    "version": "3.12",
    "release": "3.12.1",
    "mtime": 1704473584,
    "db_size": 17684105,
    "attribution": "&copy; 2001&ndash;2023 Python Software Foundation<br>\n      Licensed under the PSF License."
  },