Add some METADATA files to control docs layout.
authorjcgregorio <jcgregorio@google.com>
Thu, 5 Mar 2015 15:11:13 +0000 (07:11 -0800)
committerCommit bot <commit-bot@chromium.org>
Thu, 5 Mar 2015 15:11:13 +0000 (07:11 -0800)
BUG=skia:3484
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=976303002

Review URL: https://codereview.chromium.org/976303002

site/METADATA [new file with mode: 0644]
site/dev/tools/markdown.md
site/user/METADATA [new file with mode: 0644]

diff --git a/site/METADATA b/site/METADATA
new file mode 100644 (file)
index 0000000..5c6310b
--- /dev/null
@@ -0,0 +1,4 @@
+{
+  "dirOrder": ["user", "dev"],
+  "fileOrder": []
+}
index ffdff4b576ecc0a0eca6b2793a10d334af647c63..e624a27239653318969fbd69efa4a2bab184ae2d 100644 (file)
@@ -34,6 +34,26 @@ the --port flag:
 
     docserver --preview --port=:8002
 
+METADATA
+--------
+
+By default all files and directories that appear in the same level are sorted
+alphabetically by file name in the navigation menu, with files appearing
+before directories. You can override this default behavior by adding a
+METADATA file to a directory. A METADATA file is a JSON file of the following
+format:
+
+~~~~
+   {
+     "dirOrder": ["sample", "quick", "special"],
+     "fileOrder": ["download", "api"]
+   }
+~~~~
+
+If a file or directory doesn't appear in `dirOrder` or `fileOrder` then it is sorted
+to appear after the members of `dirOrder` or `fileOrder` respectively. All
+files and directories that aren't controlled by a METADATA file are sorted in
+alphabetical order by their filename.
 
 Some Example MarkDown
 ---------------------
diff --git a/site/user/METADATA b/site/user/METADATA
new file mode 100644 (file)
index 0000000..5d835d9
--- /dev/null
@@ -0,0 +1,4 @@
+{
+  "dirOrder": ["sample", "quick", "special"],
+  "fileOrder": ["download", "api"]
+}