2019-11-30 11:35:09 -05:00
|
|
|
---
|
|
|
|
permalink: /assets/js/search-data.json
|
|
|
|
---
|
|
|
|
{
|
2020-07-10 13:07:01 -04:00
|
|
|
{%- assign i = 0 -%}
|
2020-07-09 15:07:24 -04:00
|
|
|
{%- assign pages_array = '' | split: '' -%}
|
|
|
|
{%- assign pages_array = pages_array | push: site.html_pages -%}
|
2020-07-10 13:07:01 -04:00
|
|
|
{%- if site.just_the_docs.collections -%}
|
|
|
|
{%- for collection_entry in site.just_the_docs.collections -%}
|
|
|
|
{%- assign collection_key = collection_entry[0] -%}
|
|
|
|
{%- assign collection_value = collection_entry[1] -%}
|
|
|
|
{%- assign collection = site[collection_key] -%}
|
|
|
|
{%- if collection_value.search_exclude != true -%}
|
|
|
|
{%- assign pages_array = pages_array | push: collection -%}
|
|
|
|
{%- endif -%}
|
2020-07-09 15:07:24 -04:00
|
|
|
{%- endfor -%}
|
|
|
|
{%- endif -%}
|
|
|
|
{%- for pages in pages_array -%}
|
|
|
|
{%- for page in pages -%}
|
2019-12-29 13:19:00 -05:00
|
|
|
{%- if page.title and page.search_exclude != true -%}
|
|
|
|
{%- assign page_content = page.content -%}
|
2019-12-29 15:30:44 -05:00
|
|
|
{%- assign heading_level = site.search.heading_level | default: 2 -%}
|
2019-12-29 13:19:00 -05:00
|
|
|
{%- for j in (2..heading_level) -%}
|
|
|
|
{%- assign tag = '<h' | append: j -%}
|
|
|
|
{%- assign closing_tag = '</h' | append: j -%}
|
|
|
|
{%- assign page_content = page_content | replace: tag, '<h1' | replace: closing_tag, '</h1' -%}
|
|
|
|
{%- endfor -%}
|
|
|
|
{%- assign parts = page_content | split: '<h1' -%}
|
|
|
|
{%- assign title_found = false -%}
|
2020-07-09 15:07:24 -04:00
|
|
|
{%- for part in parts offset: 1 -%}
|
2019-12-29 13:19:00 -05:00
|
|
|
{%- assign titleAndContent = part | split: '</h1>' -%}
|
|
|
|
{%- assign title = titleAndContent[0] | replace_first: '>', '<h1>' | split: '<h1>' -%}
|
|
|
|
{%- assign title = title[1] | strip_html -%}
|
|
|
|
{%- assign content = titleAndContent[1] -%}
|
|
|
|
{%- assign url = page.url -%}
|
|
|
|
{%- if title == page.title and parts[0] == '' -%}
|
|
|
|
{%- assign title_found = true -%}
|
|
|
|
{%- else -%}
|
|
|
|
{%- assign id = titleAndContent[0] -%}
|
|
|
|
{%- assign id = id | split: 'id="' -%}
|
|
|
|
{%- if id.size == 2 -%}
|
|
|
|
{%- assign id = id[1] -%}
|
|
|
|
{%- assign id = id | split: '"' -%}
|
|
|
|
{%- assign id = id[0] -%}
|
|
|
|
{%- capture url -%}{{ url | append: '#' | append: id }}{%- endcapture -%}
|
|
|
|
{%- endif -%}
|
|
|
|
{%- endif -%}
|
|
|
|
{%- unless i == 0 -%},{%- endunless -%}
|
|
|
|
"{{ i }}": {
|
2020-01-02 05:55:38 -05:00
|
|
|
"doc": {{ page.title | jsonify }},
|
|
|
|
"title": {{ title | jsonify }},
|
|
|
|
"content": {{ content | replace: '</h', ' . </h' | replace: '<hr', ' . <hr' | replace: '</p', ' . </p' | replace: '<ul', ' . <ul' | replace: '</ul', ' . </ul' | replace: '<ol', ' . <ol' | replace: '</ol', ' . </ol' | replace: '</tr', ' . </tr' | replace: '<li', ' | <li' | replace: '</li', ' | </li' | replace: '</td', ' | </td' | replace: '<td', ' | <td' | replace: '</th', ' | </th' | replace: '<th', ' | <th' | strip_html | remove: 'Table of contents' | normalize_whitespace | replace: '. . .', '.' | replace: '. .', '.' | replace: '| |', '|' | append: ' ' | jsonify }},
|
2019-12-29 13:19:00 -05:00
|
|
|
"url": "{{ url | absolute_url }}",
|
|
|
|
"relUrl": "{{ url }}"
|
|
|
|
}
|
|
|
|
{%- assign i = i | plus: 1 -%}
|
|
|
|
{%- endfor -%}
|
|
|
|
{%- unless title_found -%}
|
|
|
|
{%- unless i == 0 -%},{%- endunless -%}
|
|
|
|
"{{ i }}": {
|
2020-01-02 05:55:38 -05:00
|
|
|
"doc": {{ page.title | jsonify }},
|
|
|
|
"title": {{ page.title | jsonify }},
|
|
|
|
"content": {{ parts[0] | replace: '</h', ' . </h' | replace: '<hr', ' . <hr' | replace: '</p', ' . </p' | replace: '<ul', ' . <ul' | replace: '</ul', ' . </ul' | replace: '<ol', ' . <ol' | replace: '</ol', ' . </ol' | replace: '</tr', ' . </tr' | replace: '<li', ' | <li' | replace: '</li', ' | </li' | replace: '</td', ' | </td' | replace: '<td', ' | <td' | replace: '</th', ' | </th' | replace: '<th', ' | <th' | strip_html | remove: 'Table of contents' | normalize_whitespace | replace: '. . .', '.' | replace: '. .', '.' | replace: '| |', '|' | append: ' ' | jsonify }},
|
2019-11-30 11:35:09 -05:00
|
|
|
"url": "{{ page.url | absolute_url }}",
|
|
|
|
"relUrl": "{{ page.url }}"
|
2019-12-29 13:19:00 -05:00
|
|
|
}
|
|
|
|
{%- assign i = i | plus: 1 -%}
|
|
|
|
{%- endunless -%}
|
|
|
|
{%- endif -%}
|
2020-07-09 15:07:24 -04:00
|
|
|
{%- endfor -%}
|
|
|
|
{%- endfor %}
|
2020-06-18 16:39:58 -04:00
|
|
|
}
|