diff --git a/_includes/user_posts.liquid b/_includes/user_posts.liquid new file mode 100644 index 0000000..018d5d1 --- /dev/null +++ b/_includes/user_posts.liquid @@ -0,0 +1,61 @@ +

{{ page.author }}'s submissions

+ +{% comment %} Filter posts by the author specified in the page front matter {% endcomment %} +{% assign user_posts = site.posts | where: "author", page.author | sort: 'date' | reverse %} + +
+ {% if user_posts.size > 0 %} +
+ {% for post in user_posts %} +
+ +
+
+ {% endfor %} +
+ {% else %} +

This user has no submissions yet.

+ {% endif %} +
diff --git a/pages/user_posts.md b/pages/user_posts.md new file mode 100644 index 0000000..95d9a8d --- /dev/null +++ b/pages/user_posts.md @@ -0,0 +1,8 @@ +--- +layout: simple +title: User Submissions +author: post_author_placeholder # Replace with actual author/username variable if needed +permalink: /user_posts/ # Consider making this dynamic, e.g., /user/:username/posts/ +--- + +{% include user_posts.liquid %}