From 61eae5c5f9881cab29712f6e696085baa977e1f9 Mon Sep 17 00:00:00 2001 From: Jeffrey Tse Date: Wed, 11 Sep 2019 12:19:34 +0800 Subject: release: v1.0.0 --- _includes/functions/get_categories.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 _includes/functions/get_categories.html (limited to '_includes/functions/get_categories.html') diff --git a/_includes/functions/get_categories.html b/_includes/functions/get_categories.html new file mode 100644 index 0000000..babb7a0 --- /dev/null +++ b/_includes/functions/get_categories.html @@ -0,0 +1,12 @@ +{% assign split_mark = '<|>' %} + +{% assign categories = '' %} +{% for category in site.categories %} + {% assign name = category | first %} + {% assign categories = categories | append: split_mark | append: name %} +{% endfor %} + +{% assign return = categories + | remove_first: split_mark + | split: split_mark + | sort: self %} -- cgit v1.2.3