sitemap.html 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. {% extends "base.html" %}
  2. {% block title %}{{ section.title }}{% endblock title %}
  3. {% block header_logo %}
  4. <p class="header-title">{{ config.title }} | {{ section.title }}</p>
  5. {% endblock header_logo %}
  6. {% block content %}
  7. {{ section.content | safe }}
  8. <div>
  9. <h2>Parent</h2>
  10. <ul>
  11. <!-- List parent -->
  12. {% if section.ancestors | length > 0 %}
  13. {% set parent = section.ancestors | last %}
  14. {% set parent_path = parent | as_str %}
  15. {% set parent_section = get_section(path=parent_path) %}
  16. {% set my_section = parent_section %}
  17. <li>
  18. <a href="{{ parent_section.permalink }}">{{ parent_section.title }}</a>
  19. </li>
  20. {% else%}
  21. <li><a href=".">Back up</a></li>
  22. {% endif %}
  23. </ul>
  24. </div>
  25. <!-- List pages -->
  26. {% if my_section.pages %}
  27. <div>
  28. <h2>Pages</h2>
  29. <ul>
  30. {% set sorted_section_pages = my_section.pages | sort(attribute="title") %}
  31. {% for page in sorted_section_pages %}
  32. <li>
  33. <p>{% if page.date %}{{ page.date }} &bullet;{% endif %}
  34. <a href="{{ page.permalink }}">{{ page.title }}</a>
  35. </p>
  36. {% if page.description %}
  37. <p>{{ page.description }}</p>
  38. {% elif page.summary %}
  39. <p>{{ page.summary }}</p>
  40. {% else %}
  41. <p>{{ page.title }}....</p>
  42. {% endif %}
  43. </li>
  44. {% endfor %}
  45. </ul>
  46. </div>
  47. {% endif %}
  48. <!-- List subsections -->
  49. {% if my_section.subsections %}
  50. <div>
  51. <h2>Sections</h2>
  52. <ul>
  53. {% set sorted_section_subsections = my_section.subsections | sort() %}
  54. {% for section_subsection in sorted_section_subsections %}
  55. {% set subsection = get_section(path=section_subsection) %}
  56. <li>
  57. <a href="{{ subsection.permalink | safe }}">{{ subsection.title }}</a>
  58. </li>
  59. {% endfor %}
  60. </ul>
  61. </div>
  62. {% endif %}
  63. {% endblock content %}