Skip to content

Commit 47820cd

Browse files
authored
Use Nunjucks joiner for sameAs array (#618)
1 parent e95d150 commit 47820cd

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎src/_includes/seo-meta.njk‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@
7777
"jobTitle": {{ seo.person.role | safeJsonLd | safe }},
7878
"url": {{ canonicalUrl | safeJsonLd | safe }},
7979
"sameAs": [
80-
{% if seo.person.github %}{{ ("https://github.com/" + seo.person.github) | safeJsonLd | safe }}{% endif %}
81-
{% if seo.person.github and seo.person.linkedin %},{% endif %}
82-
{% if seo.person.linkedin %}{{ seo.person.linkedin | safeJsonLd | safe }}{% endif %}
80+
{%- set comma = joiner(",") -%}
81+
{%- if seo.person.github -%}{{ comma() }}{{ ("https://github.com/" + seo.person.github) | safeJsonLd | safe }}{%- endif -%}
82+
{%- if seo.person.linkedin -%}{{ comma() }}{{ seo.person.linkedin | safeJsonLd | safe }}{%- endif -%}
8383
]
8484
}
8585
</script>

0 commit comments

Comments
 (0)