OLD | NEW |
---|---|
(Empty) | |
1 // === Overview === | |
2 // | |
3 // This file configures where to find and how to serve content in the docserver. | |
4 // It's the most fundamentally important file in all of the docserver. | |
5 // | |
6 // === Format === | |
7 // | |
8 // Each entry declares rule with an arbitrary identifier | |
9 // ("cr-extensions-examples"), where the content is hosted ("chromium") aka | |
10 // "type", a path within that host to look in ("docs/examples") aka "chroot", | |
11 // and what URL the rule should match ("extensions/examples") aka "servlet". | |
Jeffrey Yasskin
2013/11/04 23:45:21
s/servlet/serveFrom/?
Or maybe "serverUrlPath" or
| |
12 // | |
13 // In this example, when the user navigates to | |
14 // | |
15 // developer.chrome.com/extensions/examples/some/sample/path | |
16 // | |
17 // then the "cr-extensions-examples" rule is matched (since it has the | |
18 // "extensions/examples" servlet); then the docserver will look up the path | |
19 // "docs/examples/some/sample/path" (which is the URL after the servlet, | |
20 // "some/sample/path", prefixed by the chroot "docs/examples") within the | |
21 // Chromium repository, and serve that. | |
22 // | |
23 // === Special properties === | |
24 // | |
25 // There are some other properties that can be specified: | |
26 // * "supportsZip" indicates whether directories are allowed to be served as | |
27 // zip files. For safety this isn't supported for arbitrary URLs, only those | |
28 // within a rule that has "supportsZip": true. | |
29 // * "supportsTemplates" indicates whether HTML files should be treated and | |
30 // renderered as templates, versus just plain text. Complex documentation | |
31 // which interacts with docserver features (like API listing) need to set | |
32 // this to true. Otherwise, it's safer and more efficient to omit it. | |
33 | |
34 { | |
35 "cr-extensions-examples": { | |
36 "chroot": "docs/examples", | |
37 "serveFrom": "extensions/examples", | |
38 "supportsZip": true, | |
39 "type": "chromium" | |
40 }, | |
41 "cr-public": { | |
42 "chroot": "docs/templates/public", | |
43 "serveFrom": "", | |
44 "supportsTemplates": true, | |
45 "type": "chromium" | |
46 }, | |
47 "cr-static": { | |
48 "chroot": "docs/static", | |
49 "serveFrom": "static", | |
50 "type": "chromium" | |
51 } | |
52 } | |
OLD | NEW |