generated from dig-lib/annonatate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
32 lines (32 loc) · 2.2 KB
/
index.html
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
---
layout: null
permalink: /
---
{% assign images = site.static_files | where_exp: 'item', 'item.path contains "/images/"' | sort_natural | map: 'path' %}
{% assign collections = site.pages | where_exp: 'item', 'item.dir == "/collections/"' | sort_natural %}
{% assign manifests = site.pages | where_exp: 'item', 'item.name contains "manifest.json"' | map: 'url' %}
{% assign customviews = site.pages | where_exp: 'item', 'item.dir contains "customviews"' | sort_natural %}
{% assign manifestarray = '' | split: "" %}
{% for manifest in manifests %}
{% assign item = manifest | prepend: site.baseurl | prepend: site.url %}
{% assign manifestarray = manifestarray | push: item %}
{% endfor %}
{% assign imagearray = '' | split: "" %}
{% for image in images %}
{% unless image contains 'assets' %}
{% assign item = image | prepend: site.baseurl | prepend: site.url %}
{% assign imagearray = imagearray | push: item %}
{% endunless %}
{% endfor %}
{"annotations": [{% for file in site.annotations %}{
{{'filename' | jsonify}}:{{site.url | append: site.baseurl | append: file.url| append: file.ext | jsonify}},{{'order' | jsonify}}:{{file.order | jsonify}}, {{'json' | jsonify}}:{{file.content | replace: "<", "<" | replace: ">", ">"}}
}{% unless forloop.last %},{% endunless %}{% endfor %}],
"manifests": {{manifestarray | jsonify}}, "images": {{imagearray| jsonify}},
"preloadedcontent": {{site.data.preload | jsonify}},
"customviews": [{% for customview in customviews %}{
{{'filename' | jsonify}}:{{site.url | append: site.baseurl | append: customview.url| jsonify}},{{'json' | jsonify}}:{{customview.content | replace: '<script src="https://ncsu-libraries.github.io/annona/dist/annona.js"></script>', '' | replace: '<link rel="stylesheet" type="text/css" href="https://ncsu-libraries.github.io/annona/dist/annona.css">', '' | replace: "<", "<" | replace: ">", ">" | jsonify}}
}{% unless forloop.last %},{% endunless %}{% endfor %}],
"collections": [{% for collection in collections %}{
{{'filename' | jsonify}}:{{site.url | append: site.baseurl | append: collection.url| jsonify}},{{'json' | jsonify}}:{{collection.content | replace: "<", "<" | replace: ">", ">"}}
}{% unless forloop.last %},{% endunless %}{% endfor %}]
}