Sha256: 2778e8dcc3515fc284b6a0b4dbd1624ac7768b6b2fcbe7fce3c66caddf9cae21

Contents?: true

Size: 1.7 KB

Versions: 238

Compression:

Stored size: 1.7 KB

Contents

{%- include languages/languages.html -%}
{%- if page.permalink == nil -%}
<link data-rh="true" rel="alternate" href="{{site.url}}" hreflang="en" />
{%- for i in matchurls -%}
{%- for checklang in site.pages -%}
{%- if checklang.permalink == i -%}
{%- assign languagetext = [i] -%}
<link data-rh="true" rel="alternate" href="{{site.url}}/{{languagetext[0]}}" hreflang="{{languagetext[0]}}" />
{%- endif -%}
{%- endfor -%}

{%- endfor -%}
{%- else -%}

{%- if matchurls contains page.permalink -%}
{%- assign languagetext = [i] -%}
<link data-rh="true" rel="alternate" href="{{site.url}}" hreflang="en" />
{%- for i in matchurls -%}
{%- assign languagetext = [i] -%}
{%- if i== page.permalink -%}
<link data-rh="true" rel="alternate" href="{{site.url}}{{page.permalink}}" hreflang="{{languagetext[0]}}" />
{%- else -%}
{%- for checklang in site.pages -%}
{%- if checklang.permalink == i -%}
{%- assign languagetext = [i] -%}
<link data-rh="true" rel="alternate" href="{{site.url}}/{{languagetext[0]}}" hreflang="{{languagetext[0]}}" />
{%- endif -%}
{%- endfor -%}
{%- endif -%}
{%- endfor -%}
{%- else -%}
{%- for item in site.pages -%}
{%- assign languagetext = [item.lang] -%}
{%- assign pagelink = page.permalink | split: "/" | last-%}
{%- assign itemlink = item.permalink | split: "/" | last-%}
{%- if pagelink == itemlink and page.lang != item.lang and page.permalink !=
item.permalink -%}
<link data-rh="true" rel="alternate" href="{{site.url}}{{item.permalink}}" hreflang="{{languagetext[0]}}" />
{%- endif -%}
{%- if pagelink == itemlink and page.lang == item.lang -%}

<link data-rh="true" rel="alternate" href="{{site.url}}{{item.permalink}}" hreflang="{{languagetext[0]}}" />
{%- endif -%}
{%- endfor -%}
{%- endif -%}
{%- endif -%}

Version data entries

238 entries across 238 versions & 2 rubygems

Version Path
word-games-theme-2.8.8 _includes/alternates/alternates.html
appscms-tools-theme-4.5.4 _includes/alternates/alternates.html
appscms-tools-theme-4.5.3 _includes/alternates/alternates.html
appscms-tools-theme-4.5.2 _includes/alternates/alternates.html
appscms-tools-theme-4.5.1 _includes/alternates/alternates.html
appscms-tools-theme-4.5.0 _includes/alternates/alternates.html
appscms-tools-theme-4.4.9 _includes/alternates/alternates.html
appscms-tools-theme-4.4.8 _includes/alternates/alternates.html
appscms-tools-theme-4.4.7 _includes/alternates/alternates.html
appscms-tools-theme-4.4.6 _includes/alternates/alternates.html
appscms-tools-theme-4.4.5 _includes/alternates/alternates.html
appscms-tools-theme-4.4.4 _includes/alternates/alternates.html
appscms-tools-theme-4.4.3 _includes/alternates/alternates.html
appscms-tools-theme-4.4.2 _includes/alternates/alternates.html
appscms-tools-theme-4.4.1 _includes/alternates/alternates.html
appscms-tools-theme-4.4.0 _includes/alternates/alternates.html
appscms-tools-theme-4.3.9 _includes/alternates/alternates.html
appscms-tools-theme-4.3.8 _includes/alternates/alternates.html
appscms-tools-theme-4.3.7 _includes/alternates/alternates.html
appscms-tools-theme-4.3.6 _includes/alternates/alternates.html