Added search.button configuration

Improved documentation for search configurations
This commit is contained in:
Silvio Giebl
2019-12-29 21:30:44 +01:00
parent 2ef0029068
commit 82b3f15443
5 changed files with 43 additions and 15 deletions

View File

@@ -51,7 +51,7 @@ function initNav() {
}
});
{% if site.search_enabled != false -%}
{% if site.search_enabled != false and site.search.button -%}
const searchInput = document.getElementById('search-input');
const searchButton = document.getElementById('search-button');

View File

@@ -6,7 +6,7 @@ permalink: /assets/js/search-data.json
{% for page in site.html_pages %}
{%- if page.title and page.search_exclude != true -%}
{%- assign page_content = page.content -%}
{%- assign heading_level = site.search.heading_level | default: 1 -%}
{%- assign heading_level = site.search.heading_level | default: 2 -%}
{%- for j in (2..heading_level) -%}
{%- assign tag = '<h' | append: j -%}
{%- assign closing_tag = '</h' | append: j -%}