Initial commit

This commit is contained in:
Nasir Anthony Montalvo
2025-11-13 14:48:58 -06:00
committed by GitHub
commit 526096840e
2349 changed files with 19464 additions and 0 deletions

18
assets/data/subjects.json Normal file
View File

@@ -0,0 +1,18 @@
---
# find and count unique subjects
#
# Requires CB's array_count_uniq.rb plugin!
---
{%- if site.data.theme.subjects-fields -%}
{%- assign items = site.data[site.metadata] | where_exp: 'item','item.objectid' -%}
{%- assign subjects-fields = site.data.theme.subjects-fields | split: ";" -%}
{%- assign subjects = "" -%}
{%- for c in subjects-fields -%}
{% assign new = items | map: c | join: ";" %}
{% assign subjects = subjects | append: ";" | append: new %}
{%- endfor -%}
{%- assign uniqSubjects = subjects | downcase | split: ";" | array_count_uniq -%}
{ "subjects": [
{% for s in uniqSubjects %}{ "subject" : {{ s[0] | jsonify }}, "count" : {{ s[1] | jsonify }}, "link" : {{ s[0] | url_param_escape | prepend: '/browse.html#' | absolute_url | jsonify }} }{% unless forloop.last %},
{% endunless %}{% endfor %}
]}{%- endif -%}