-
Notifications
You must be signed in to change notification settings - Fork 1
/
search_data.json
36 lines (32 loc) · 1.48 KB
/
search_data.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
layout: null
---
{
{% for item_hash in site.data.marc %}
{%- assign object = item_hash[1] -%}
{%- assign id = item_hash[0] -%}
{%- assign collection_id = object.uri | split:'/' | last -%}
{% capture note_configs %}{% include note_configs.html %}{% endcapture %}
{%- assign note_configs = note_configs | newline_to_br | split: '<br />' -%}
{%- assign note_content = "" | split: ',' -%}
{%- for config in note_configs -%}
{%- assign splitNote = config | split: ":" -%}
{%- assign field = splitNote[0] | strip -%}
{%- capture content -%}{% include note_content.html object=object field=field %}{%- endcapture -%}
{% if content.size > 1 %}
{% assign content = content | escape %}
{%- assign note_content = note_content | push: content -%}
{% endif %}
{%- endfor -%}
{%- capture publication_info -%}{%- include publication_info.html object=object -%}{%- endcapture -%}
"/items/{{id}}/": {
"title": "{%- include title.html object=object -%}",
"ref": "/items/{{id}}/",
"url": "{{site.url}}/items/{{id}}/",
"author": "{%- include author_list.html object=object separator=', ' -%}",
"subject": "{%- include subject_list.html object=object separator=', ' -%}",
"notes": "{{note_content | join: ', ' }}",
"dates": "{{publication_info | replace: '"', '\"'}}",
"call_number": "{%- include call_number.html object=object -%}"}{%- unless forloop.last -%},
{% endunless %}
{%- endfor -%} }