Sha256: 22d62280495df4b91a2ffaab2d11408341c77a88eb71efa55991d09bbcd92e99
Contents?: true
Size: 1.96 KB
Versions: 2
Compression:
Stored size: 1.96 KB
Contents
--- layout: page --- <!-- Html Elements for Search --> <input type="text" id="search-input" placeholder="Enter keywords..." class="search-bar"> <br> <br> <ul id="results-container" ></ul> <section> <!-- Script pointing to jekyll-search.js --> <script src="{{ site.baseurl }}/assets/js/jekyll-search.min.js" type="text/javascript"></script> <script type="text/javascript"> SimpleJekyllSearch({ searchInput: document.getElementById('search-input'), resultsContainer: document.getElementById('results-container'), json: [ {% if site.theme_settings.search %} {% for post in site.posts %} { "title" : "{{ post.title | escape }}", "category" : "{{ post.content | strip_html | strip_newlines | truncatewords: 25 }}", "tags" : "{{ post.tags | join: ', ' | prepend: " " }}", "url" : "{{ site.baseurl }}{{ post.url }}", "date" : "{{ post.date | date: "%B %-d, %Y" }}", "content" : "{{ post.content | strip_html | strip_newlines }}" } {% unless forloop.last %},{% endunless %} {% endfor %}, {% for page in site.portfolio %} { {% if page.title != nil %} "title" : "{{ page.title | escape }}", "category" : "{{ page.content | strip_html | strip_newlines | truncatewords: 25 }}", "tags" : "{{ page.tags | join: ', ' | prepend: " " }}", "url" : "{{ site.baseurl }}{{ page.url }}", "date" : "{{ page.date | date: "%B %-d, %Y" }}", "content" : "{{ page.content | strip_html | strip_newlines }}" {% endif %} } {% unless forloop.last %},{% endunless %} {% endfor %} {% endif %} ], searchResultTemplate: '<div class="search-title"><a href="{url}"><h3> {title}</h3></a><div class="meta">{date} <div class="right"><i class="fa fa-tag"></i> {tags}</div></div><p>{category}</p></div><hr> ', noResultsText: 'No results found', limit: 10, fuzzy: true, exclude: [] }) </script> </section>
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
type-on-strap-0.2.0 | _layouts/search.html |
jekyll-theme-type-on-strap-1.0.0 | _layouts/search.html |