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

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: rebase 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..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"
+ }
+}
« no previous file with comments | « chrome/common/extensions/docs/server2/servlet.py ('k') | chrome/common/extensions/docs/templates/public/404.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698