Updated doc_collections format

This commit is contained in:
Silvio Giebl 2020-07-09 23:33:52 +02:00
parent d476ce5748
commit d1c3e08337
3 changed files with 10 additions and 4 deletions

View File

@ -51,8 +51,9 @@ layout: table_wrappers
{% if site.doc_collections %}
{% assign doc_collections_size = site.doc_collections | size %}
{% for doc_collection in site.doc_collections %}
{% assign name = doc_collection.name %}
{% assign collection = site[doc_collection.collection] %}
{% assign collection_name = doc_collection[0] %}
{% assign collection = site[collection_name] %}
{% assign name = doc_collection[1].name %}
{% if doc_collections_size > 1 %}
<div class="nav-category">{{ name }}</div>
{% endif %}
@ -155,6 +156,9 @@ layout: table_wrappers
site.gh_edit_branch and
site.gh_edit_view_mode
%}
{{ site.github.repository_url }}
{{ site.github.source.branch }}
{{ site.github.source.path }}
<p class="text-small text-grey-dk-000 mb-0">
<a href="{{ site.gh_edit_repository }}/{{ site.gh_edit_view_mode }}/{{ site.gh_edit_branch }}/{{ page.path }}" id="edit-this-page">{{ site.gh_edit_link_text }}</a>
</p>

View File

@ -7,7 +7,8 @@ permalink: /assets/js/search-data.json
{%- assign pages_array = pages_array | push: site.html_pages -%}
{%- if site.doc_collections -%}
{%- for doc_collection in site.doc_collections -%}
{%- assign collection = site[doc_collection.collection] -%}
{% assign collection_name = doc_collection[0] %}
{% assign collection = site[collection_name] %}
{%- assign pages_array = pages_array | push: collection -%}
{%- endfor -%}
{%- endif -%}

View File

@ -17,7 +17,8 @@ permalink: /assets/js/search-data.json
{%- assign pages_array = pages_array | push: site.html_pages -%}
{%- if site.doc_collections -%}
{%- for doc_collection in site.doc_collections -%}
{%- assign collection = site[doc_collection.collection] -%}
{% assign collection_name = doc_collection[0] %}
{% assign collection = site[collection_name] %}
{%- assign pages_array = pages_array | push: collection -%}
{%- endfor -%}
{%- endif -%}