diff --git a/_includes/partial/publisher_link.html b/_includes/partial/publisher_link.html new file mode 100644 index 00000000..1dd51881 --- /dev/null +++ b/_includes/partial/publisher_link.html @@ -0,0 +1,3 @@ +{% assign pub_small = include.pub | downcase %} +{% assign publisher_ref = site.publishers | where: 'short_name', pub_small | first %} +{{ publisher_ref.name }} \ No newline at end of file diff --git a/_layouts/collection/collection_base.html b/_layouts/collection/collection_base.html index 4cc6a965..dd89bf54 100644 --- a/_layouts/collection/collection_base.html +++ b/_layouts/collection/collection_base.html @@ -15,10 +15,7 @@ layout: default

{{ page.title }}

{{ page.date | date_to_string }} - {% assign publisher = site.publishers | where: 'short_name', page.author | first %} - {% if publisher %} - - {{ publisher.name }} - {% endif %} + {% include partial/publisher_link.html pub= page.author %}

{{ content }} \ No newline at end of file diff --git a/_layouts/collection/collection_index.html b/_layouts/collection/collection_index.html index 684d52fd..927ac218 100644 --- a/_layouts/collection/collection_index.html +++ b/_layouts/collection/collection_index.html @@ -14,7 +14,7 @@ layout: default {{ item.title }} {{ item.excerpt | strip_html | strip_newlines | truncate: 156 }} - {{ item.date | date_to_string }} | {{ item.author }} + {{ item.date | date_to_string }} | {% include partial/publisher_link.html pub=item.author %} {% endfor %}