Add documentation for workspace()
--
MOS_MIGRATED_REVID=87622845
diff --git a/src/main/java/com/google/devtools/build/docgen/templates/be-footer.html b/src/main/java/com/google/devtools/build/docgen/templates/be-footer.html
index 7fd649d..75c764e 100644
--- a/src/main/java/com/google/devtools/build/docgen/templates/be-footer.html
+++ b/src/main/java/com/google/devtools/build/docgen/templates/be-footer.html
@@ -563,6 +563,31 @@
</li>
</ul>
+<!-- =================================================================
+ workspace()
+ =================================================================
+-->
+
+<h3 id="workspace">workspace</h3>
+
+<p><code>workspace(name = "something")</code></p>
+
+<p>This can only be used in the WORKSPACE file.</p>
+
+<p>The sets an optional name for the repository.</p>
+
+<p>This name is used for the directory that runfiles are stored in. For
+ example, if there is a runfile foo/bar and the WORKSPACE file contains
+ <code>workspace(name = "baz")</code>, then the runfile will be output under
+ mytarget.runfiles/baz/foo/bar. If no workspace name is specified, then the
+ runfile will be symlinked to bar.runfiles/foo/bar.
+</p>
+
+<p>A workspace name can contain slashes if a deeper directory listing is
+ desired (<code>workspace(name = "baz/qux")</code> will place the runfile at
+ bar.runfiles/baz/qux/foo/bar).
+</p>
+
</div>
</div>
</body>
diff --git a/src/main/java/com/google/devtools/build/docgen/templates/be-header.html b/src/main/java/com/google/devtools/build/docgen/templates/be-header.html
index 3e8fdff..0aba2e7 100644
--- a/src/main/java/com/google/devtools/build/docgen/templates/be-header.html
+++ b/src/main/java/com/google/devtools/build/docgen/templates/be-header.html
@@ -210,6 +210,7 @@
<li><a href="#exports_files">exports_files</a></li>
<li><a href="#glob">glob</a></li>
<li><a href="#select">select</a></li>
+ <li><a href="#workspace">workspace</a></li>
</ul>
</td></tr></table>