generated_docs_index.html 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. {% assign toc_dir = site.data.toc %}
  2. {% assign tocfile = toc_dir.[page.tocfile] %}
  3. <div class="home">
  4. {% for entry in tocfile %}
  5. <h1>{{ entry.name }}</h1>
  6. <ul>
  7. {% for child in entry.children %}
  8. {% comment %}
  9. skip sub-sections; they'll get their own sections below
  10. {% endcomment %}
  11. {% if child.children %}{% continue %}{% endif %}
  12. <li>
  13. <h2><a href="{{ child.url }}">{{ child.name }}</a></h2>
  14. {% if child.description %}<span class="summary">{{ child.description }}</span>{% endif %}
  15. </li>
  16. {% endfor %}
  17. </ul>
  18. {% comment %}
  19. add sections for sub-sections
  20. {% endcomment %}
  21. {% for child in entry.children %}
  22. {% if child.children %}
  23. <h2>{{ child.name }}</h2>
  24. <ul>
  25. {% for grandchild in child.children %}
  26. <li>
  27. <h2><a href="{{ grandchild.url }}">{{ grandchild.name }}</a></h2>
  28. {% if grandchild.description %}<span class="summary">{{ grandchild.description }}</span>{% endif %}
  29. </li>
  30. {% endfor %}
  31. </ul>
  32. {% endif %}
  33. {% endfor %}
  34. {% endfor %}
  35. </div>