experimenting with algolia search

This commit is contained in:
Tom Johnson
2016-01-21 17:29:06 -08:00
parent ccc0490aad
commit fcae37b779
16 changed files with 1247 additions and 123 deletions

View File

@ -4,23 +4,32 @@ layout: none
search: exclude
---
[
{% for page in site.pages %}
{% unless page.search == "exclude" %}
//[
//{% for page in site.pages %}
//{% unless page.search == "exclude" %}
//{
//"title": "{{ page.title | escape }}",
//"tags": "{{ page.tags }}",
//"keywords": "{{page.keywords}}",
//"url": "{{ page.url | prepend: '..' }}",
//"summary": "{{page.summary}}"
//},
//{% endunless %}
//
//{% endfor %}
//null
//]
{
"title": "{{ page.title | escape }}",
"tags": "{{ page.tags }}",
"keywords": "{{page.keywords}}",
"url": "{{ page.url | prepend: '..' }}",
"summary": "{{page.summary}}"
},
{% for post in site.pages %}
{% unless page.search == "exclude" %}
"{{ post.url | slugify }}": {
"title": "{{ post.title | xml_escape }}",
"url": " {{ post.url | xml_escape | prepend: '..'}}",
"summary": {{post.summary}},
"tags": "{{ post.tags | xml_escape }}"
}
{% endunless %}
{% unless forloop.last %},{% endunless %}
{% endfor %}
null
]
{% comment %} Removed:
"body": "{{ page.content | strip| strip_html | strip_newlines | replace: '\', '\\\\' | replace: '"', '\\"' | replace: '^t', ' '}}"
{% endcomment %}
}