Sha256: 14b9e8ceef20b1e91251d24c294c6b5ab89d66301ce372caf802da5d234e5cd3

Contents?: true

Size: 1.74 KB

Versions: 8

Compression:

Stored size: 1.74 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

8 entries across 8 versions & 1 rubygems

Version Path
appscms-tools-theme-4.7.0 _includes/alternates/alternates.html
appscms-tools-theme-4.6.8 _includes/alternates/alternates.html
appscms-tools-theme-4.6.7 _includes/alternates/alternates.html
appscms-tools-theme-4.6.6 _includes/alternates/alternates.html
appscms-tools-theme-4.6.5 _includes/alternates/alternates.html
appscms-tools-theme-4.6.4 _includes/alternates/alternates.html
appscms-tools-theme-4.6.3 _includes/alternates/alternates.html
appscms-tools-theme-4.6.2 _includes/alternates/alternates.html