This commit is contained in:
Rico Sta. Cruz 2017-08-28 23:33:59 +08:00
parent 241855fc9e
commit 8e4a8eadab
No known key found for this signature in database
GPG Key ID: CAAD38AE2962619A
3 changed files with 18 additions and 6 deletions

View File

@ -21,6 +21,7 @@ kramdown:
defaults: defaults:
- scope: - scope:
path: "" path: ""
type: pages
values: values:
layout: "default" layout: "default"
category: "Others" category: "Others"

View File

@ -0,0 +1,6 @@
<a class='article item' href="{{base}}{{ include.page.url | remove: '.html' }}">
<code class='slug'>{{ include.page.url | remove: '.html' | remove: '/' }}</code>
{% if include.page.title | downcase != include.page.url | remove: '.html' | remove: '/' %}
<span class='title'>{{ include.page.title }}</span>
{% endif %}
</a>

View File

@ -11,6 +11,16 @@ type: website
</div> </div>
<div class='pages-list'> <div class='pages-list'>
<h2 class='category item' id='{{ category | downcase | replace: " ", "-" }}'>
<span>Top cheatsheets</span>
</h2>
{{ site.tags }}
{% for page in site.tags.Featured %}
{% include 2017/pages-list-item.html page=page %}
{% endfor %}
{% for category in site.category_names %} {% for category in site.category_names %}
<h2 class='category item' id='{{ category | downcase | replace: " ", "-" }}'> <h2 class='category item' id='{{ category | downcase | replace: " ", "-" }}'>
<span>{{ category }}</span> <span>{{ category }}</span>
@ -19,12 +29,7 @@ type: website
{% for page in site.pages %} {% for page in site.pages %}
{% if page.category == category %} {% if page.category == category %}
{% if page.type == article %} {% if page.type == article %}
<a class='article item' href="{{base}}{{ page.url | remove: '.html' }}"> {% include 2017/pages-list-item.html page=page %}
<code class='slug'>{{ page.url | remove: '.html' | remove: '/' }}</code>
{% if page.title | downcase != page.url | remove: '.html' | remove: '/' %}
<span class='title'>{{ page.title }}</span>
{% endif %}
</a>
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endfor %} {% endfor %}