Sha256: 7b6f76d4e05702bd70add1b542419d81738ef05171f9e39ff7dc93e005f0b9c2
Contents?: true
Size: 1.51 KB
Versions: 5
Compression:
Stored size: 1.51 KB
Contents
{% comment %} Start from the language chapter(eg: en-us) or root(/) {% endcomment %} {%- assign workdir = include.workdir | default: "/" -%} {%- if page.dir != "/" -%} {%- assign chapter = page.dir | remove_first: "/" | split: "/" | first -%} {%- if languages contains chapter -%} {%- capture workdir %}/{{ chapter }}/{% endcapture -%} {%- endif -%} {%- endif -%} {%- assign workdir_level = workdir | append: "temp/" | split: "/" | size | minus: 1 -%} {%- assign workdir_files = site_files | where_exp: "item", "item.dir == workdir" -%} {%- capture items -%} {%- for item in site_dirs -%} {%- assign current_m1 = item.dir | append: "temp/" | split: "/" | size | minus: 2 -%} {%- if workdir_level == current_m1 -%} {%- assign temp = workdir | append: "@@" -%} {%- assign dir = item.dir | replace: workdir, temp | split: "@@" | first -%} {% comment %} In the current subdirectory {% endcomment %} {%- if workdir == dir -%} {% comment %} Root directory does not display other languages {% endcomment %} {%- if workdir == "/" -%} {%- assign language = item.dir | replace: "/", "" -%} {%- unless languages contains language %}{{ item.dir }}|{% endunless -%} {%- else -%} {{ item.dir }}| {%- endif -%} {%- endif -%} {%- endif -%} {%- endfor -%} {%- endcapture -%} {%- assign workdir_dirs = items | split: "|" -%}
Version data entries
5 entries across 5 versions & 1 rubygems