mirror of
https://github.com/thangisme/notes.git
synced 2025-01-05 00:26:27 -05:00
Added just-the-docs.collections nav_exclude and search_exclude
Renamed doc_collections to just-the-docs.collections
This commit is contained in:
parent
9faba6cd91
commit
6b27beaf58
@ -48,16 +48,18 @@ layout: table_wrappers
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<nav role="navigation" aria-label="Main" id="site-nav" class="site-nav">
|
<nav role="navigation" aria-label="Main" id="site-nav" class="site-nav">
|
||||||
{% if site.doc_collections %}
|
{% if site.just_the_docs.collections %}
|
||||||
{% assign doc_collections_size = site.doc_collections | size %}
|
{% assign collections_size = site.just_the_docs.collections | size %}
|
||||||
{% for doc_collection in site.doc_collections %}
|
{% for collection_entry in site.just_the_docs.collections %}
|
||||||
{% assign collection_name = doc_collection[0] %}
|
{% assign collection_key = collection_entry[0] %}
|
||||||
{% assign collection = site[collection_name] %}
|
{% assign collection_value = collection_entry[1] %}
|
||||||
{% assign name = doc_collection[1].name %}
|
{% assign collection = site[collection_key] %}
|
||||||
|
{% if collection_value.nav_exclude != true %}
|
||||||
{% if doc_collections_size > 1 %}
|
{% if doc_collections_size > 1 %}
|
||||||
<div class="nav-category">{{ name }}</div>
|
<div class="nav-category">{{ collection_value.name }}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% include nav.html pages=collection %}
|
{% include nav.html pages=collection %}
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% include nav.html pages=site.html_pages %}
|
{% include nav.html pages=site.html_pages %}
|
||||||
|
@ -2,14 +2,17 @@
|
|||||||
permalink: /assets/js/search-data.json
|
permalink: /assets/js/search-data.json
|
||||||
---
|
---
|
||||||
{
|
{
|
||||||
{% assign i = 0 -%}
|
{%- assign i = 0 -%}
|
||||||
{%- assign pages_array = '' | split: '' -%}
|
{%- assign pages_array = '' | split: '' -%}
|
||||||
{%- assign pages_array = pages_array | push: site.html_pages -%}
|
{%- assign pages_array = pages_array | push: site.html_pages -%}
|
||||||
{%- if site.doc_collections -%}
|
{%- if site.just_the_docs.collections -%}
|
||||||
{%- for doc_collection in site.doc_collections -%}
|
{%- for collection_entry in site.just_the_docs.collections -%}
|
||||||
{% assign collection_name = doc_collection[0] %}
|
{%- assign collection_key = collection_entry[0] -%}
|
||||||
{% assign collection = site[collection_name] %}
|
{%- assign collection_value = collection_entry[1] -%}
|
||||||
|
{%- assign collection = site[collection_key] -%}
|
||||||
|
{%- if collection_value.search_exclude != true -%}
|
||||||
{%- assign pages_array = pages_array | push: collection -%}
|
{%- assign pages_array = pages_array | push: collection -%}
|
||||||
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- for pages in pages_array -%}
|
{%- for pages in pages_array -%}
|
||||||
|
@ -12,14 +12,17 @@ namespace :search do
|
|||||||
permalink: /assets/js/search-data.json
|
permalink: /assets/js/search-data.json
|
||||||
---
|
---
|
||||||
{
|
{
|
||||||
{% assign i = 0 -%}
|
{%- assign i = 0 -%}
|
||||||
{%- assign pages_array = \'\' | split: \'\' -%}
|
{%- assign pages_array = '' | split: '' -%}
|
||||||
{%- assign pages_array = pages_array | push: site.html_pages -%}
|
{%- assign pages_array = pages_array | push: site.html_pages -%}
|
||||||
{%- if site.doc_collections -%}
|
{%- if site.just_the_docs.collections -%}
|
||||||
{%- for doc_collection in site.doc_collections -%}
|
{%- for collection_entry in site.just_the_docs.collections -%}
|
||||||
{% assign collection_name = doc_collection[0] %}
|
{%- assign collection_key = collection_entry[0] -%}
|
||||||
{% assign collection = site[collection_name] %}
|
{%- assign collection_value = collection_entry[1] -%}
|
||||||
|
{%- assign collection = site[collection_key] -%}
|
||||||
|
{%- if collection_value.search_exclude != true -%}
|
||||||
{%- assign pages_array = pages_array | push: collection -%}
|
{%- assign pages_array = pages_array | push: collection -%}
|
||||||
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- for pages in pages_array -%}
|
{%- for pages in pages_array -%}
|
||||||
|
Loading…
Reference in New Issue
Block a user