generated from google/eleventy-high-performance-blog
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
search.njk
21 lines (21 loc) · 622 Bytes
/
search.njk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
---
permalink: search.json
---
{"search" : [
{%- for item in collections.shortbits -%}
{
"url" : "{{ item.url }}",
"title" : "{{ item.data.title }}",
{% set content = (item.data.title + " " + item.templateContent) %}
"text" : "{{ content | squash }}"
}{% if not loop.last %},{% else %}{%- endif -%}
{%- endfor -%},
{%- for item in collections.posts -%}
{
"url" : "{{ item.url }}",
"title" : "{{ item.data.title }}",
{% set content = (item.data.title + " " + item.templateContent) %}
"text" : "{{ content | squash }}"
}{% if not loop.last %},{% else %}{%- endif -%}
{%- endfor -%}
]}