Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Unified Diff: chrome/common/extensions/docs/templates/json/content_providers.json

Issue 54603010: Docserver: Implement the content providers infrastructure, where a (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: jeffrey Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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"
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698