layout | title | group |
---|---|---|
docs |
View all |
components |
-
{% for page in site.data.nav[3].pages %}
- {{ page.title }} {% endfor %}
{% for page in site.data.nav[3].pages %}
{% capture content %}{% include_relative {{page.title | downcase | replace: ' ','-' }}.md %}{% endcapture %}{% assign lines = content | newline_to_br | split: "
" %}
{% assign newContent = "" %} {% for l in lines %} {% if forloop.index >= 6 %} {% assign newContent = newContent | append: l %} {% endif %} {% endfor %} {{ newContent | markdownify }} {% endfor %}
assumes viewall.md is placed in docs/components
access by visiting http://0.0.0.0:9001/components/viewall
To setup a viewall for content and layout place the above file into the layout and content folders replace the nav index to 1 and 2 accordingly.
Layout: site.data.nav[1]
Content: : site.data.nav[2]