Files
CoderSherlock.github.io/category.html
T
haopengzhan 47c2c2e8a1 Add sitemap and minor change
changed the date format under category page
2021-10-13 19:11:17 -04:00

28 lines
847 B
HTML

---
layout: default
title: Category
permalink: /category/
public: true
---
<div class="home">
<h1 class="page-heading">Category</h1>
<ul class="post-list">
{% capture categories %}{% for category in site.categories %}{{ category | first }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %}
{% assign category = categories | split:',' | sort %}
{% for item in (0..site.categories.size) %}{% unless forloop.last %}
{% capture word %}{{ category[item] | strip_newlines }}{% endcapture %}
<h2 class="category" id="{{ word }}">{{ word | upcase }}</h2>
<ul>
{% for post in site.categories[word] %}{% if post.title != null %}
<li><span>{{ post.date | date: "%b %-d, %Y" }}</span> » <a href="{{ site.baseurl}}{{ post.url }}">{{ post.title }}</a></li>
{% endif %}{% endfor %}
</ul>
{% endunless %}{% endfor %}
</ul>
</div>