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..926faf6b3d18eca4e04038684621559537f97fb4 |
--- /dev/null |
+++ b/chrome/common/extensions/docs/templates/json/content_providers.json |
@@ -0,0 +1,52 @@ |
+// === 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 rule with an arbitrary identifier |
+// ("cr-extensions-examples"), where the content is hosted ("chromium") aka |
+// "type", a path within that host to look in ("docs/examples") aka "chroot", |
+// 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
|
+// |
+// In this example, when the user navigates to |
+// |
+// developer.chrome.com/extensions/examples/some/sample/path |
+// |
+// then the "cr-extensions-examples" rule is matched (since it has the |
+// "extensions/examples" servlet); then the docserver will look up the path |
+// "docs/examples/some/sample/path" (which is the URL after the servlet, |
+// "some/sample/path", prefixed by the chroot "docs/examples") within the |
+// Chromium repository, and serve that. |
+// |
+// === 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": { |
+ "chroot": "docs/examples", |
+ "serveFrom": "extensions/examples", |
+ "supportsZip": true, |
+ "type": "chromium" |
+ }, |
+ "cr-public": { |
+ "chroot": "docs/templates/public", |
+ "serveFrom": "", |
+ "supportsTemplates": true, |
+ "type": "chromium" |
+ }, |
+ "cr-static": { |
+ "chroot": "docs/static", |
+ "serveFrom": "static", |
+ "type": "chromium" |
+ } |
+} |