Ver código fonte

Add single-level TOC to docs.html

Daniel Rudolf 9 anos atrás
pai
commit
ef9d6fb89e
2 arquivos alterados com 12 adições e 2 exclusões
  1. 3 0
      _docs/install.md
  2. 9 2
      docs.html

+ 3 - 0
_docs/install.md

@@ -1,4 +1,7 @@
 ---
+toc:
+    install: Install
+    run: Run
 ---
 
 ## Install

+ 9 - 2
docs.html

@@ -13,11 +13,18 @@ nav: 2
         </p><br />
 
         <div class="one-fourth">
-            <!-- ToDo -->
+            <ul>
+                {% for doc in site.docs %}
+                    {% for item in doc.toc %}
+                        <li>
+                            <a href="#{{ item[0] }}">{{ item[1] }}</a>
+                        </li>
+                    {% endfor %}
+                {% endfor %}
+            </ul>
         </div>
         <div class="three-fourth last">
             {% for doc in site.docs %}
-                <!-- path = {{ doc.path }} -->
                 {{ doc.output }}
             {% endfor %}