| Index: chrome/common/extensions/docs/templates/json/content_providers.json
|
| diff --git a/chrome/common/extensions/docs/templates/json/content_providers.json b/chrome/common/extensions/docs/templates/json/content_providers.json
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..2e6599e304571f870f103a9a63e4164d048aab78
|
| --- /dev/null
|
| +++ b/chrome/common/extensions/docs/templates/json/content_providers.json
|
| @@ -0,0 +1,60 @@
|
| +// === Overview ===
|
| +//
|
| +// This file configures where to find and how to serve content in the docserver.
|
| +// It's the most fundamentally important file in all of the docserver.
|
| +//
|
| +// === Format ===
|
| +//
|
| +// Each entry declares a rule with:
|
| +// * An arbitrary identifier key e.g. "cr-extensions-examples".
|
| +// * What URL the rule should be invoked with, given by "serveFrom", e.g.
|
| +// "extensions/examples".
|
| +// * An object describing where the content originates; currently the only
|
| +// supported location is "chromium" with a key "dir" specifying which
|
| +// chromium directory to look in, e.g. "extensions/samples".
|
| +//
|
| +// In this example, when the user navigates to
|
| +//
|
| +// developer.chrome.com/extensions/examples/some/sample/path
|
| +//
|
| +// then
|
| +// 1. The "cr-extensions-examples" rule is invoked (since it's served from
|
| +// "extensions/examples").
|
| +// 2. The docserver will look up the path "docs/examples/some/sample/path"
|
| +// in chromium - the URL after the "serveFrom" path (some/sample/path)
|
| +// prefixed by the chromium directory (docs/examples).
|
| +// 3. Then render and serve it.
|
| +//
|
| +// === Special properties ===
|
| +//
|
| +// There are some other properties that can be specified:
|
| +// * "supportsZip" indicates whether directories are allowed to be served as
|
| +// zip files. For safety this isn't supported for arbitrary URLs, only those
|
| +// within a rule that has "supportsZip": true.
|
| +// * "supportsTemplates" indicates whether HTML files should be treated and
|
| +// renderered as templates, versus just plain text. Complex documentation
|
| +// which interacts with docserver features (like API listing) need to set
|
| +// this to true. Otherwise, it's safer and more efficient to omit it.
|
| +
|
| +{
|
| + "cr-extensions-examples": {
|
| + "chromium": {
|
| + "dir": "docs/examples"
|
| + },
|
| + "serveFrom": "extensions/examples",
|
| + "supportsZip": true
|
| + },
|
| + "cr-public": {
|
| + "chromium": {
|
| + "dir": "docs/templates/public"
|
| + },
|
| + "serveFrom": "",
|
| + "supportsTemplates": true
|
| + },
|
| + "cr-static": {
|
| + "chromium": {
|
| + "dir": "docs/static"
|
| + },
|
| + "serveFrom": "static"
|
| + }
|
| +}
|
|
|