Skip to content

Commit 3779838

Browse files
author
benquist
committed
Fix schema sameAs output to exclude null entries
1 parent 0a0f53d commit 3779838

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

_includes/metadata.liquid

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@
227227
{% assign sameaslinks = sameaslinks | push: social[1].url %}
228228
{% endcase %}
229229
{% endfor %}
230+
{% assign sameaslinks_clean = sameaslinks | where_exp: 'item', 'item != blank' | uniq %}
230231

231232
{% assign page_abs_url = page.url | prepend: site.baseurl | prepend: site.url | remove_first: 'index.html' %}
232233
{% assign person_id = site.url | append: '/#brian-enquist' %}
@@ -280,8 +281,8 @@
280281
"Trait-based ecology",
281282
"Biodiversity informatics",
282283
"Ecological forecasting"
283-
]{% if sameaslinks != blank %},
284-
"sameAs": {{ sameaslinks | jsonify }}{% endif %}
284+
]{% if sameaslinks_clean != blank %},
285+
"sameAs": {{ sameaslinks_clean | jsonify }}{% endif %}
285286
},
286287
{
287288
"@type": "WebSite",

0 commit comments

Comments
 (0)