From f50d84238d85d6f2b0d039a6ef7dbc623c6b397b Mon Sep 17 00:00:00 2001 From: Bangara Raju Kottedi Date: Sat, 30 Mar 2024 00:54:55 +0530 Subject: [PATCH] Added Series posts functionality --- _drafts/2023-07-23-future-post.md | 2 +- _drafts/2024-03-12-yaml-mcq.yml | 25 --------------- _includes/post-series.html | 32 +++++++++++++++++++ _layouts/post.html | 1 + _posts/2023-07-22-hello.md | 2 +- ...023-07-22-self-hosted-commenting-system.md | 2 +- 6 files changed, 36 insertions(+), 28 deletions(-) delete mode 100644 _drafts/2024-03-12-yaml-mcq.yml create mode 100644 _includes/post-series.html diff --git a/_drafts/2023-07-23-future-post.md b/_drafts/2023-07-23-future-post.md index f4081ff..02e7206 100644 --- a/_drafts/2023-07-23-future-post.md +++ b/_drafts/2023-07-23-future-post.md @@ -5,4 +5,4 @@ date: 2023-07-23 0:00:00 +0530 tags: [test, self-hosted] --- -# Future Post Modified \ No newline at end of file +## Future Post Modified \ No newline at end of file diff --git a/_drafts/2024-03-12-yaml-mcq.yml b/_drafts/2024-03-12-yaml-mcq.yml deleted file mode 100644 index c6eca61..0000000 --- a/_drafts/2024-03-12-yaml-mcq.yml +++ /dev/null @@ -1,25 +0,0 @@ -title: This is the Quiz Title -randomized: false -questions: - - - type: "multiple-choice" - question: "What is your favorite color?" - items: - - choice: Red - correct: null - - choice: Blue - correct: null - - choice: Green - correct: null - followup: There is no correct answer to asking your favorite color! All choices would be good. - - - type: "multiple-choice" - question: "True or False, Pittsburgh is West of Philadelphia" - items: - - choice: True - correct: true - - choice: False - correct: false - followup: | - The answer is True! Pittsburgh is 304.9 miles West of Philadelphia, or approximately - a car ride of 4 hours and 52 minutes. Buckle up! \ No newline at end of file diff --git a/_includes/post-series.html b/_includes/post-series.html new file mode 100644 index 0000000..f525ccf --- /dev/null +++ b/_includes/post-series.html @@ -0,0 +1,32 @@ + + +{% if page.series %} +{% assign posts = site.posts | where: "series", page.series | sort: 'date' %} +
+
+
+

{{ page.series }}

+
    + {% assign posts = site.posts | where: "series", page.series | sort: "date" %} + {% for post in posts %} +
  1. {% if post.url == page.url %}{{ post.title }} {% else %} + {{ post.title }}{% endif %} +
  2. + {% endfor %} +
+
+
+
+{% endif %} \ No newline at end of file diff --git a/_layouts/post.html b/_layouts/post.html index a5a54d9..de636d8 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -91,6 +91,7 @@ tail_includes: + {% include post-series.html %}
diff --git a/_posts/2023-07-22-hello.md b/_posts/2023-07-22-hello.md index 768309e..b2aa415 100644 --- a/_posts/2023-07-22-hello.md +++ b/_posts/2023-07-22-hello.md @@ -6,4 +6,4 @@ tags: [hello, world] --- -# Hello World +## Hello World diff --git a/_posts/2023-07-22-self-hosted-commenting-system.md b/_posts/2023-07-22-self-hosted-commenting-system.md index 23ff7df..3b30270 100644 --- a/_posts/2023-07-22-self-hosted-commenting-system.md +++ b/_posts/2023-07-22-self-hosted-commenting-system.md @@ -4,7 +4,7 @@ date: 2023-07-23 0:00:00 +0530 tags: [privacy, self-hosted, comment-system, remark42] --- -# Privacy-focused lightweight commenting engine +## Privacy-focused lightweight commenting engine ## [Remark 42](https://remark42.com/)