-
Notifications
You must be signed in to change notification settings - Fork 267
Expand file tree
/
Copy pathsearch.json
More file actions
22 lines (22 loc) · 1.04 KB
/
search.json
File metadata and controls
22 lines (22 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
---
layout: null
regenerate: false
---
[ {}
{% for page in site.pages %}
{% if page.layout == 'post' and page.title and page.permalink %}
{% assign generated_placeholder_image = page.permalink | replace: '.html', '' | slugify | prepend: '/public/generated/placeholders/' | append: '.jpg' %}
{% assign generated_placeholder_file = site.static_files | where: 'path', generated_placeholder_image | first %}
,{
"title": {{ page.title | jsonify }},
"url": {{ page.permalink | jsonify }},
"content": {{ page.content | strip_html | strip_newlines | jsonify }},
"excerpt": {{ page.content | strip_html | truncatewords: 50 | jsonify }},
"tags": {{ page.tags | jsonify }},
"image": {{ page.image | default: generated_placeholder_file.path | default: "/public/images/RetroReversingLogoSmall.png" | jsonify }},
"consoleImage": {{ site.category_images[page.console] | default: "/public/images/RetroReversingLogoSmall.png" | jsonify }},
"console": {{ page.console | jsonify }}
}
{% endif %}
{% endfor %}
]