_includes/alternates/alternates.html in word-games-theme-2.9.9 vs _includes/alternates/alternates.html in word-games-theme-3.0.0
- old
+ new
@@ -71,12 +71,15 @@
{%- if whitelist_urls -%}
{% for url in whitelist_urls %}
{% assign current_url = url | remove_first: '/' | strip %}
{% assign language_url = languagetext[0] | strip %}
{% if current_url == language_url %}
-<link data-rh="true" rel="alternate" href="{{site.url}}/{{languagetext[0]}}" hreflang="{{languagetext[0]}}" />
+{%- assign exclude_url = true -%}
{% endif %}
+{%- if exclude_url -%}
+<link data-rh="true" rel="alternate" href="{{site.url}}/{{languagetext[0]}}" hreflang="{{languagetext[0]}}" />
+{%- endif -%}
{% endfor %}
{%- endif -%}
{%- else -%}
<link data-rh="true" rel="alternate" href="{{site.url}}/{{languagetext[0]}}" hreflang="{{languagetext[0]}}" />
{%- endif -%}
@@ -97,12 +100,15 @@
{% if noindex_languages contains languagetext[0] %}
{%- if whitelist_urls -%}
{% for url in whitelist_urls %}
{% assign current_url = url | strip %}
{% if current_url == item.permalink %}
-<link data-rh="true" rel="alternate" href="{{site.url}}{{item.permalink}}" hreflang="{{languagetext[0]}}" />
+{%- assign exclude_url = true -%}
{% endif %}
{% endfor %}
+{%- if exclude_url -%}
+<link data-rh="true" rel="alternate" href="{{site.url}}{{item.permalink}}" hreflang="{{languagetext[0]}}" />
+{%- endif -%}
{%- endif -%}
{%- else -%}
<link data-rh="true" rel="alternate" href="{{site.url}}{{item.permalink}}" hreflang="{{languagetext[0]}}" />
{%- endif -%}
{%- endif -%}
\ No newline at end of file