Sha256: edb105a52859e16206435dc1ffb363301756edf23535f8e7d00c7f78b78c1a2b
Contents?: true
Size: 1.75 KB
Versions: 2
Compression:
Stored size: 1.75 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
appscms-tools-theme-1.3.9 | _includes/alternates/alternates.html |
appscms-tools-theme-1.3.8 | _includes/alternates/alternates.html |