Skip to content

Commit

Permalink
chore: remove summary from search json template (#1490)
Browse files Browse the repository at this point in the history
* remove summary from search json template
  • Loading branch information
Saad M authored Jun 26, 2019
1 parent 61bb87a commit 34ae802
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 27 deletions.
1 change: 1 addition & 0 deletions docs/_includes/search-box.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
fuzzy: true,
});
</script>

42 changes: 15 additions & 27 deletions docs/js/search.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,19 @@ search: exclude
layout:
---

[
{% for page in site.pages %}
{% unless page.search == "exclude" %}
{
"title": "{{ page.title | escape }}",
"tags": "{{ page.tags }}",
"keywords": "{{page.keywords}}",
"url": "{{ page.url}}",
"summary": "{{page.summary | strip }}",
"folder": "{{page.folder | strip }}"
}
{% unless forloop.last and site.posts.size < 1 %},{% endunless %}
{% endunless %}
{% endfor %}

[{% for page in site.pages %}{% unless page.search == "exclude" %}
{
"title": "{{ page.title | escape }}",
"tags": "{{ page.tags }}",
"keywords": "{{page.keywords}}",
"url": "{{ page.url}}",
"folder": "{{page.folder | strip }}"
}{% unless forloop.last and site.posts.size < 1 %},{% endunless %}{% endunless %}{% endfor %}
{% for post in site.posts %}

{
"title": "{{ post.title | escape }}",
"tags": "{{ post.tags }}",
"keywords": "{{post.keywords}}",
"url": "{{ post.url | remove: "/" }}",
"summary": "{{post.summary | strip }}"
}
{% unless forloop.last %},{% endunless %}
{% endfor %}

]
{
"title": "{{ post.title | escape }}",
"tags": "{{ post.tags }}",
"keywords": "{{post.keywords}}",
"url": "{{ post.url | remove: "/" }}"
}
{% unless forloop.last %},{% endunless %}{% endfor %}]

0 comments on commit 34ae802

Please sign in to comment.