Sha256: 11695a211fd8d4b1f1586b033ea3d9c484a4eae25f0a2a56b3d7eacb14023fb6

Contents?: true

Size: 1.6 KB

Versions: 1

Compression:

Stored size: 1.6 KB

Contents

{%- include reset/workdir.liquid %}

{% comment %} display the directory name {% endcomment %}
{%- assign dir = site_pages | where: "url", workdir | first -%}
{%- if workdir_level == 2 %}
    {% comment %} display the root sub-directory as "p.caption" {% endcomment %}
    <p class="caption"><span class="caption-text">{{ dir.title | default: dir.url }}</span></p>
{%- else %}
    <a class="reference internal" href="{{ dir.url | relative_url }}">{{ dir.title | default: dir.url }}</a>
{%- endif -%}

<ul>
    {% comment %} list file {% endcomment %}
    {%- for item in workdir_files -%}
        {%- assign level = item.dir | append: "temp" | replace_first: "/", "" | split: "/" | size | minus: 1 -%}
        {%- capture current -%}
            {%- if page.url == item.url %}current{% endif -%}
        {%- endcapture %}

        <li class="toctree-l{{ level }} {{ current }}" data-sort="{{ item.sort }}" data-level="{{ level }}">
            <a class="reference internal {{ current }}" href="{{ item.url | relative_url }}">
                {%- if item.sort and site.show_sorted != false -%}
                    {{ item.sort }}. {{ item.title | default: item.url }}
                {%- else -%}
                    {{ item.title | default: item.url }}
                {%- endif -%}
            </a>
        </li>
    {%- endfor -%}

    {% comment %} list dirs {% endcomment %}
    {%- for workdir in workdir_dirs -%}
        {%- assign level = workdir | append: "temp" | replace_first: "/", "" | split: "/" | size | minus: 2 %}
        <li class="toctree-l{{ level }}">{% include extend/toctree.liquid %}</li>
    {%- endfor -%}
</ul>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jekyll-rtd-theme-1.1.8 _includes/extend/toctree.liquid