From f62417e43a52c1d2ccdd967df9f6bbdf727736cb Mon Sep 17 00:00:00 2001 From: Derek Enos Date: Thu, 3 Sep 2020 14:00:38 -0400 Subject: [PATCH] Made featured image include work with both ...-objectid and ...-link as specified separately in the current repo's theme.yml --- _includes/image/featured-image.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/image/featured-image.html b/_includes/image/featured-image.html index aed4d41..ffdddba 100644 --- a/_includes/image/featured-image.html +++ b/_includes/image/featured-image.html @@ -1 +1 @@ -{%- if site.data.theme.featured-image -%}{% unless site.data.theme.featured-image contains '/' %}{% assign featuredItem = site.data[site.metadata] | where: 'objectid', site.data.theme.featured-image | first %}{% if featuredItem.youtubeid %}https://img.youtube.com/vi/{{ featuredItem.youtubeid }}/maxdefault.jpg{% elsif featuredItem.format contains 'image' %}{{ site.objects | relative_url }}/{{ featuredItem.filename }}{% else %}{{ site.objects | relative_url }}/small/{{ featuredItem.objectid }}_sm.jpg{% endif %}{% else %}{{ site.data.theme.featured-image | absolute_url }}{% endunless %}{% else %}{{ '/assets/img/collectionbuilder-logo.png' | absolute_url }}{%- endif -%} \ No newline at end of file +{%- if site.data.theme.featured-image-objectid -%}{%- assign object_metadata = site.data[site.metadata] | where: 'objectid', site.data.theme.featured-image-objectid | first -%}{%- if object_metadata.format contains 'image' -%}{{ site.digital-objects }}/{{ site.data.theme.featured-image-objectid }}.jpg{%- else -%}{{ site.digital-objects }}/small/{{ site.data.theme.featured-image-objectid }}_sm.jpg{%- endif -%}{%- elsif site.data.theme.featured-image-link -%}{{ site.data.theme.featured-image-link | absolute_url }}{%- else -%}{{ '/assets/img/collectionbuilder-logo.png' | absolute_url }}{%- endif -%}