examples.json should include a way to list significant manifest keys
Rob--W opened this issue · 0 comments
Rob--W commented
examples.json lists all samples plus relevant extension APIs in javascript_apis
. But there are several extension APIs with significant functionality in its manifest keys. By significant, I mean not just because it is referenced (e.g. name
and description
are quite meaningless), but because the example is a notably good demonstration of the APIs in use.
To make it easier to find the right examples, we should introduce a new key, e.g. manifest_keys
to link examples to manifest keys.
Tasks:
- Update CONTRIBUTING to list the new key.
- Update examples.json to mention significant manifest keys.
- Update macro to parse key in https://github.com/mdn/yari/blob/main/kumascript/macros/WebExtAllExamples.ejs
- Update macro to parse key in https://github.com/mdn/yari/blob/main/kumascript/macros/WebExtExamples.ejs
- Update articles under https://github.com/mdn/content/tree/main/files/en-us/mozilla/add-ons/webextensions/manifest.json to (automatically) reference the new examples with the macro.
Example of expected results:
- Update
examples.json
to add"manifest_keys": ["protocol_handlers"]
to theopen-irc-links
example atwebextensions-examples/examples.json
Lines 586 to 590 in 9433f84
- Append
{{WebExtExamples}}
to## Examples
atfiles/en-us/mozilla/add-ons/webextensions/manifest.json/protocol_handlers/index.md
in the mdn/content repo - The example should be rendered at https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/protocol_handlers#example
- The table of examples should also list the manifest key at https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Examples