blob: 779ca090a520747f285b2afa66b82a61d01883b3 [file] [log] [blame]
// === 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, either "chromium"
// or "github".
// * "chromium" must provide a "dir" value specifying which chromium directory
// to look in, e.g. "extensions/samples".
// * "github" must provide "owner" and "repo" values specifying the owner of
// the GitHub repository, and the repository name, e.g. "GoogleChrome" and
// "chrome-app-samples" respectively.
//
// In the chromium 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": "chrome/common/extensions/docs/examples"
},
"serveFrom": "extensions/examples",
"supportsZip": true
},
"cr-public": {
"chromium": {
"dir": "chrome/common/extensions/docs/templates/public"
},
"serveFrom": "",
"supportsTemplates": true
},
"cr-static": {
"chromium": {
"dir": "chrome/common/extensions/docs/static"
},
"serveFrom": "static"
},
"cr-native-client": {
"chromium": {
"dir": "components/nacl/docs/dev"
},
"serveFrom": "nacl",
"supportsTemplates": true
},
"devtools-docs": {
"github": {
"owner": "GoogleChrome",
"repo": "devtools-docs-migration"
},
"serveFrom": "devtools",
"supportsTemplates": true
},
"multidevice-docs": {
"github": {
"owner": "GoogleChrome",
"repo": "multi-device"
},
"serveFrom": "multidevice",
"supportsTemplates": true
},
"webstore-docs": {
"github": {
"owner": "GoogleChrome",
"repo": "webstore-docs"
},
"serveFrom": "webstore",
"supportsTemplates": true
}
}