site/_includes/docs_option.html (9 lines of code) (raw):
{% assign items = include.items %}{% comment %}
{% endcomment %}{% for item in items %}{% comment %}
{% endcomment %}{% assign item_url = item | prepend:"{{ site.baseurl }}/docs/" | append:".html" %}{% comment %}
{% endcomment %}{% for p in site.docs %}{% comment %}
{% endcomment %}{% if p.url == item_url %}{% comment %}
{% endcomment %}<option value="{{ site.url }}{{ p.url }}">{{ p.title }}</option>{% comment %}
{% endcomment %}{% endif %}{% comment %}
{% endcomment %}{% endfor %}{% comment %}
{% endcomment %}{% endfor %}