{%- comment -%} Outputs a dropdown with specific boxes versions for which we have documentation. Parameters: - currentVersion: the version of the current page, e.g. 'v2.1.0' - contentPiece: the page to target, e.g. 'config-syntax' {%- endcomment -%} {%- comment -%} ------------ Determine the list of boxes versions ------------ {%- endcomment -%} {%- assign versions = "" | split: "," -%} {%- for p in site.pages -%} {%- if p.bxVersion -%} {%- assign versions = versions | push: p.bxVersion -%} {%- endif -%} {%- endfor - %} {%- assign versions = versions | sort | uniq | reverse -%} {%- comment -%} ------------ Output the dopdown control ------------ {%- endcomment -%}