Files
bqkc/assets/data/locations.csv
Nasir Anthony Montalvo 526096840e Initial commit
2025-11-13 14:48:58 -06:00

18 lines
737 B
CSV

---
# find all unique locations used in the metadata
#
# Requires CB's array_count_uniq.rb plugin!
---
{%- if site.data.theme.locations-fields -%}
{%- assign items = site.data[site.metadata] | where_exp: 'item','item.objectid' -%}
{%- assign locations-fields = site.data.theme.locations-fields | split: ";" -%}
{%- assign places = "" -%}
{%- for c in locations-fields -%}
{% assign new = items | map: c | join: ";" %}
{% assign places = places | append: ";" | append: new %}
{%- endfor -%}
{%- assign uniqPlaces = places | downcase | split: ";" | array_count_uniq -%}
location,count,link
{% for s in uniqPlaces %}"{{ s[0] }}",{{ s[1] }},"{{ s[0] | url_param_escape | prepend: '/browse.html#' | absolute_url }}"
{% endfor %}
{%- endif -%}