-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove Lunr trimmer & bring back colons * Add Greek Stemmer * Translate search_placeholder_text and results_found to Greek * Minimize JSON data * Truncate Words * Move store variable into a new file * Move Lunr files into a new folder * Add defer to lunr scripts * Add search_full_content switch
- Loading branch information
1 parent
76b02a8
commit 3fb63f3
Showing
8 changed files
with
67 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
layout: null | ||
--- | ||
|
||
var store = [ | ||
{% for c in site.collections %} | ||
{% if forloop.last %} | ||
{% assign l = true %} | ||
{% endif %} | ||
{% assign docs = c.docs | where_exp:'doc','doc.search != false' %} | ||
{% for doc in docs %} | ||
{% if doc.header.teaser %} | ||
{% capture teaser %}{{ doc.header.teaser }}{% endcapture %} | ||
{% else %} | ||
{% assign teaser = site.teaser %} | ||
{% endif %} | ||
{ | ||
"title": {{ doc.title | jsonify }}, | ||
"excerpt": | ||
{% if site.search_full_content == true %} | ||
{{ doc.content | strip_html | strip_newlines | jsonify }}, | ||
{% else %} | ||
{{ doc.content | strip_html | strip_newlines | truncatewords: 50 | jsonify }}, | ||
{% endif %} | ||
"categories": {{ doc.categories | jsonify }}, | ||
"tags": {{ doc.tags | jsonify }}, | ||
"url": {{ doc.url | absolute_url | jsonify }}, | ||
"teaser": | ||
{% if teaser contains "://" %} | ||
{{ teaser | jsonify }} | ||
{% else %} | ||
{{ teaser | absolute_url | jsonify }} | ||
{% endif %} | ||
}{% unless forloop.last and l %},{% endunless %} | ||
{% endfor %} | ||
{% endfor %}] |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters