Initial commit
This commit is contained in:
18
assets/data/subjects.csv
Normal file
18
assets/data/subjects.csv
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
# find all unique subjects used in the metadata
|
||||
#
|
||||
# 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 -%}
|
||||
subject,count,link
|
||||
{% for s in uniqSubjects %}"{{ s[0] }}",{{ s[1] }},"{{ s[0] | url_param_escape | prepend: '/browse.html#' | absolute_url }}"
|
||||
{% endfor %}
|
||||
{%- endif -%}
|
||||
|
Can't render this file because it contains an unexpected character in line 8 and column 71.
|
Reference in New Issue
Block a user