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
appscms-tools-theme-3.7.4 _includes/alternates/alternates.html
appscms-tools-theme-3.7.3 _includes/alternates/alternates.html
appscms-tools-theme-3.7.1 _includes/alternates/alternates.html
appscms-tools-theme-3.7.0 _includes/alternates/alternates.html
appscms-tools-theme-3.6.9 _includes/alternates/alternates.html
appscms-tools-theme-3.6.8 _includes/alternates/alternates.html
appscms-tools-theme-3.6.7 _includes/alternates/alternates.html
appscms-tools-theme-3.6.6 _includes/alternates/alternates.html
appscms-tools-theme-3.6.5 _includes/alternates/alternates.html
appscms-tools-theme-3.6.4 _includes/alternates/alternates.html
appscms-tools-theme-3.6.3 _includes/alternates/alternates.html
appscms-tools-theme-3.6.2 _includes/alternates/alternates.html
appscms-tools-theme-3.6.1 _includes/alternates/alternates.html
appscms-tools-theme-3.6.0 _includes/alternates/alternates.html
appscms-tools-theme-3.5.9 _includes/alternates/alternates.html
appscms-tools-theme-3.5.8 _includes/alternates/alternates.html
appscms-tools-theme-3.5.7 _includes/alternates/alternates.html
appscms-tools-theme-3.5.6 _includes/alternates/alternates.html
appscms-tools-theme-3.5.5 _includes/alternates/alternates.html
appscms-tools-theme-3.5.4 _includes/alternates/alternates.html