major updates across the theme to make it more user-centered
This commit is contained in:
41
search.json
41
search.json
@ -1,17 +1,20 @@
|
||||
---
|
||||
layout: none
|
||||
search: false
|
||||
---
|
||||
[
|
||||
{% for page in site.pages %}
|
||||
{% if page.search == "include" %}
|
||||
{
|
||||
"title" : "{{ page.title | escape }}",
|
||||
"category" : "{{ page.category }}",
|
||||
"url" : "{{ site.baseurl }}{{ page.url }}",
|
||||
"date" : "{{ page.date }}",
|
||||
"body": "{{ page.content | strip_html | strip_newlines | replace: '\', '\\\\' | replace: '"', '\\"' }}",
|
||||
"excerpt": "{{ page.content | strip_html | strip_newlines | truncate: 140, '…' | replace: '\', '\\' | replace: '"', '\\"' }}"
|
||||
} {% unless forloop.last %},{% endunless %}
|
||||
{% if page.search == true %}
|
||||
{
|
||||
"title": "{{ page.title | escape }}",
|
||||
"tags": "{{ page.tags }}",
|
||||
"keywords": "{{page.keywords}}",
|
||||
"url": "{{ site.baseurl }}{{ page.url }}",
|
||||
"last_updated": "{{ page.last_updated }}",
|
||||
"summary": "{{page.summary}}",
|
||||
"body": "{{ page.content | strip_html | strip_newlines | replace: '\', '\\\\' | replace: '"', '\\"' }}"
|
||||
}
|
||||
{% unless forloop.last %},{% endunless %}
|
||||
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
@ -19,16 +22,16 @@ layout: none
|
||||
{% for post in site.posts %}
|
||||
{% if forloop.length != 0 and forloop.first %},{% endif %}
|
||||
|
||||
{% if post.search == "include" %}
|
||||
{
|
||||
"title" : "{{ post.title | escape }}",
|
||||
"category" : "{{ post.category }}",
|
||||
"tags" : "{{ post.tags | array_to_sentence_string }}",
|
||||
"url" : "{{ site.baseurl }}{{ post.url }}",
|
||||
"date" : "{{ post.date }}",
|
||||
"body": "{{ post.content | strip_html | strip_newlines | replace: '\', '\\\\' | replace: '"', '\\"' }}",
|
||||
"excerpt": "{{ post.content | strip_html | strip_newlines | truncate: 140, '…' | replace: '\', '\\' | replace: '"', '\\"' }}"
|
||||
} {% unless forloop.last %},{% endunless %}
|
||||
{% if post.search == true %}
|
||||
{
|
||||
"title": "{{ page.title | escape }}",
|
||||
"tags": "{{ page.tags }}",
|
||||
"keywords": "{{page.keywords}}",
|
||||
"url": "{{ site.baseurl }}{{ page.url }}",
|
||||
"last_updated": "{{ page.last_updated }}",
|
||||
"summary": "{{page.summary}}",
|
||||
"body": "{{ page.content | strip_html | strip_newlines | replace: '\', '\\\\' | replace: '"', '\\"' }}"
|
||||
} {% unless forloop.last %},{% endunless %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
]
|
||||
|
Reference in New Issue
Block a user