1
0
mirror of https://github.com/thangisme/notes.git synced 2024-12-22 07:26:22 -05:00

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 %} {% if site.doc_collections %}
{% assign doc_collections_size = site.doc_collections | size %} {% assign doc_collections_size = site.doc_collections | size %}
{% for doc_collection in site.doc_collections %} {% for doc_collection in site.doc_collections %}
{% assign name = doc_collection.name %} {% assign collection_name = doc_collection[0] %}
{% assign collection = site[doc_collection.collection] %} {% assign collection = site[collection_name] %}
{% assign name = doc_collection[1].name %}
{% if doc_collections_size > 1 %} {% if doc_collections_size > 1 %}
<div class="nav-category">{{ name }}</div> <div class="nav-category">{{ name }}</div>
{% endif %} {% endif %}
@ -155,6 +156,9 @@ layout: table_wrappers
site.gh_edit_branch and site.gh_edit_branch and
site.gh_edit_view_mode 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"> <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> <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> </p>

View File

@ -7,7 +7,8 @@ permalink: /assets/js/search-data.json
{%- assign pages_array = pages_array | push: site.html_pages -%} {%- assign pages_array = pages_array | push: site.html_pages -%}
{%- if site.doc_collections -%} {%- if site.doc_collections -%}
{%- for doc_collection in 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 -%} {%- assign pages_array = pages_array | push: collection -%}
{%- endfor -%} {%- endfor -%}
{%- endif -%} {%- endif -%}

View File

@ -17,7 +17,8 @@ permalink: /assets/js/search-data.json
{%- assign pages_array = pages_array | push: site.html_pages -%} {%- assign pages_array = pages_array | push: site.html_pages -%}
{%- if site.doc_collections -%} {%- if site.doc_collections -%}
{%- for doc_collection in 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 -%} {%- assign pages_array = pages_array | push: collection -%}
{%- endfor -%} {%- endfor -%}
{%- endif -%} {%- endif -%}