Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 31 additions & 25 deletions _includes/doc-index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{% assign doc_content = site.data.includes %}
{% assign lang = "" %}
{% assign indexed = site.data.doc-index %}
{% assign all_docs = site.doc %}
{% else %}
{% assign lang = "/" | append: page.lang %}
{% assign doc_content = site.data.translation[page.lang].includes %}
Expand All @@ -13,6 +14,7 @@
{% if indexed == nil or indexed.size == 0 %}
{% assign indexed = site.data.doc-index %}
{% endif %}
{% assign all_docs = site.translated %}
{% endif %}
{% assign docs = doc_content | where_exp: "item", "item.section == 'doc-content'" | first %}
<!-- Opening HTML for doc content -->
Expand All @@ -26,27 +28,32 @@ <h1 id="qubes-os-documentation">{{ topic.topic }}</h1>
<p> {{ topic.subtopic }}</p>
{% assign english_count = 0 %}
{% for item in ind %}
{% assign item_en = index_english[english_count] %}
{% assign english_count = english_count | plus: 1 %}
{% assign item_en = index_english[english_count] -%}
{% assign english_count = english_count | plus: 1 -%}
<a id="{{ item_en.title | downcase | replace: " ", "-" | replace: ",", ""}}"></a>
<h2 id="{{ item.title | downcase | replace: " ", "-" | replace: ",",""}}">{{ item.title }}</h2>
{% if item.subtitle %}
<p>{{ item.subtitle }}</p>
{% endif %}
{% assign subpages = item.sub-pages | where_exp: "item", "item.title == nil" %}
{% assign subpages2 = item.sub-pages | where_exp: "item", "item.title != nil" %}
{% assign subsubpages_en = item_en.sub-pages | where_exp: "item", "item.title != nil" %}
{% assign subpages = item.sub-pages | where_exp: "item", "item.title == nil" -%}
{% assign subpages2 = item.sub-pages | where_exp: "item", "item.title != nil" -%}
{% assign subsubpages_en = item_en.sub-pages | where_exp: "item", "item.title != nil" -%}
<ul>
{% for sub in subpages %}{% for page in site.doc %}{% if page.url == sub.url %}
<li><a href="{{ sub.url }}">{{ page.title }}</a></li>
{% endif %}{% endfor %}{% endfor %}
{% for sub in subpages %}{% if item.category == 'external' %}
<li><a href="{{ sub.url }}">{{ sub.text }}</a></li>
{% endif %}{% endfor %}
{% assign sub_count = 0 %}
{% for sub in subpages -%}
{% if item.category == 'external' %}
<li><a href="{{ sub.url }}">{{ sub.text }}</a></li>
{%- else %}
{% for page in all_docs -%}
{% if page.url == sub.url -%}
<li><a href="{{ sub.url }}">{{ page.title }}</a></li>
{%- endif %}
{%- endfor %}
{%- endif %}
{%- endfor -%}
{% assign sub_count = 0 -%}
{% for sub2 in subpages2 %}
{% assign sub_o2 = subsubpages_en[sub_count] %}
{% assign sub_count = sub_count | plus: 1 %}
{% assign sub_o2 = subsubpages_en[sub_count] -%}
{% assign sub_count = sub_count | plus: 1 -%}
{% if sub2.url == nil %}
<a id="{{ sub_o2.title | downcase | replace: " ", "-" | replace: ",", "" }}"></a>
<h3 id="{{ sub2.title | downcase | replace: " ", "-" | replace: ",","" }}">{{ sub2.title }}</h3>
Expand All @@ -55,20 +62,19 @@ <h3 id="{{ sub2.title | downcase | replace: " ", "-" | replace: ",","" }}">{{ su
<li><a href="{{ sub2.url }}">{{ sub2.title }}</a></li>
</ul>
{% endif %}
{% assign subpages3 = sub2.sub-pages %}
{% assign subpages3 = sub2.sub-pages -%}
<ul>
{% for sub3 in subpages3 %}
{% for page in site.doc %}
{% if page.url == sub3.url %}
<li><a href="{{ sub3.url }}">{{ page.title }}</a></li>
{% endif %}
{% endfor %}
{% endfor %}
{% for sub3 in subpages3 %}
{% for sub3 in subpages3 -%}
{% if item.category == 'external' %}
<li><a href="{{ sub3.url }}">{{ sub3.text }}</a></li>
{% endif %}
{% endfor %}
{%- else %}
{% for page in all_docs -%}
{% if page.url == sub3.url -%}
<li><a href="{{ sub3.url }}">{{ page.title }}</a></li>
{%- endif %}
{%- endfor %}
{%- endif %}
{%- endfor %}
</ul>
{% endfor %}
</ul>
Expand Down
2 changes: 1 addition & 1 deletion _layouts/doc.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="container">
{% include doc-heading.html %}
<div class="more-bottom white-box page-content">
{% if page.permalink == '/doc/' %}
{% if page.permalink == doc_link %}
{% include doc-index.html %}
{% else %}
{% include doc-content.html %}
Expand Down