aboutsummaryrefslogtreecommitdiff
path: root/docs/_includes
diff options
context:
space:
mode:
authorTimothy Hunter <timhunter@databricks.com>2015-11-22 21:51:42 -0800
committerXiangrui Meng <meng@databricks.com>2015-11-22 21:51:42 -0800
commitfc4b792d287095d70379a51f117c225d8d857078 (patch)
tree7fe7d755fea0b91095c999b82084a3104187da83 /docs/_includes
parenta6fda0bfc16a13b28b1cecc96f1ff91363089144 (diff)
downloadspark-fc4b792d287095d70379a51f117c225d8d857078.tar.gz
spark-fc4b792d287095d70379a51f117c225d8d857078.tar.bz2
spark-fc4b792d287095d70379a51f117c225d8d857078.zip
[SPARK-11835] Adds a sidebar menu to MLlib's documentation
This PR adds a sidebar menu when browsing the user guide of MLlib. It uses a YAML file to describe the structure of the documentation. It should be trivial to adapt this to the other projects. ![screen shot 2015-11-18 at 4 46 12 pm](https://cloud.githubusercontent.com/assets/7594753/11259591/a55173f4-8e17-11e5-9340-0aed79d66262.png) Author: Timothy Hunter <timhunter@databricks.com> Closes #9826 from thunterdb/spark-11835.
Diffstat (limited to 'docs/_includes')
-rw-r--r--docs/_includes/nav-left-wrapper-ml.html8
-rw-r--r--docs/_includes/nav-left.html17
2 files changed, 25 insertions, 0 deletions
diff --git a/docs/_includes/nav-left-wrapper-ml.html b/docs/_includes/nav-left-wrapper-ml.html
new file mode 100644
index 0000000000..0103e890cc
--- /dev/null
+++ b/docs/_includes/nav-left-wrapper-ml.html
@@ -0,0 +1,8 @@
+<div class="left-menu-wrapper">
+ <div class="left-menu">
+ <h3>spark.ml package</h3>
+ {% include nav-left.html nav=include.nav-ml %}
+ <h3>spark.mllib package</h3>
+ {% include nav-left.html nav=include.nav-mllib %}
+ </div>
+</div> \ No newline at end of file
diff --git a/docs/_includes/nav-left.html b/docs/_includes/nav-left.html
new file mode 100644
index 0000000000..73176f4132
--- /dev/null
+++ b/docs/_includes/nav-left.html
@@ -0,0 +1,17 @@
+{% assign navurl = page.url | remove: 'index.html' %}
+<ul>
+{% for item in include.nav %}
+ <li>
+ <a href="{{ item.url }}">
+ {% if navurl contains item.url %}
+ <b>{{ item.text }}</b>
+ {% else %}
+ {{ item.text }}
+ {% endif %}
+ </a>
+ </li>
+ {% if item.subitems and navurl contains item.url %}
+ {% include nav-left.html nav=item.subitems %}
+ {% endif %}
+{% endfor %}
+</ul>