summaryrefslogtreecommitdiffstats
path: root/_includes/posts_by_author.html
diff options
context:
space:
mode:
Diffstat (limited to '_includes/posts_by_author.html')
-rw-r--r--_includes/posts_by_author.html7
1 files changed, 7 insertions, 0 deletions
diff --git a/_includes/posts_by_author.html b/_includes/posts_by_author.html
new file mode 100644
index 0000000..c0fbb4c
--- /dev/null
+++ b/_includes/posts_by_author.html
@@ -0,0 +1,7 @@
+{% comment %} argv: authorname {% endcomment %}
+{% assign posts_by_author = site.posts | where: "author", argv[0] %}
+{% assign author_not_specified = site.posts | where: 'author', nil %}
+{% if argv[0] == "anonymous" %}
+ {% assign posts_by_author = author_not_specified | concat: posts_by_author %}
+{% endif %}
+{% assign return = posts_by_author | sort: "date" | reverse %}