{%- assign pagelang = 'en' -%} {%- if page.lang -%} {%- assign pagelang = page.lang -%} {%- endif -%} {%- if pagelang == 'en' -%} {%- assign enpage = page -%} {%- else -%} {%- assign enpage=site.documents | where:"ref", page.ref | where: "lang", "en" | first -%} {%- unless enpage.ref -%} {%- assign enpage=site.pages | where:"ref", page.ref | where: "lang", "en" | first -%} {%- endunless -%} {%- endif -%} {%- assign englishpageurl = enpage.url %} {% assign translations=site.documents | where:"ref", page.ref | where_exp:"item", "item.lang != 'en'" | sort: 'lang' %} {%- unless translations[0].ref -%} {% assign translations=site.pages | where:"ref", page.ref | where_exp:"item", "item.lang != 'en'" | sort: 'lang' %} {%- endunless -%} {%- assign timestamp = site.time | date: '%s%N' -%} {%- assign timestamp = '?' | append: timestamp -%} {%- include_cached head.html type="start" timestamp=timestamp -%} {%- if site.data.lang[pagelang].rtl -%}