-
Notifications
You must be signed in to change notification settings - Fork 7
Tips & tricks
sskylar edited this page Jun 5, 2014
·
2 revisions
<ul>
{% for page in site.pages %}
<li>
<a href="{{page.url}}"{% if page.url == url %} class="is-current-page"{% endif %}>{{page.title}}</a>
{% if page.pages.size > 0 %}
<ul>
{% for subpage in page.pages %}
<li><a href="{{subpage.url}}"{% if subpage.url == url %} class="is-current-page"{% endif %}>{{subpage.title}}</a></li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
{% assign sorted_assets = assets.all | sort:'filename' %}
<ol>
{% for asset in sorted_assets %}
<li>{{asset.url}}</li>
{% endfor %}
</ol>
{% assign sorted_tags = site.pages['blog'].taxonomy['tags'].values | sort:'value' %}
<ul>
{% for tag in sorted_tags %}
<li><a href="{{tag.url}}">{{tag.value}}</a></li>
{% endfor %}
</ul>
Swap blog
for your page's slug, and tags
for the name of your tagset (if not using the default tags
).
{% capture html %}
<html>
...
</html>
{% endcapture %}{{ html | strip_newlines }}