From 24332c533008456f4316347071d4183e2ef1d982 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Tue, 22 Mar 2022 13:04:43 +0300 Subject: rename some includes --- README.md | 4 ++-- _includes/categories/all.html | 24 ++++++++++++++++++++++++ _includes/categories/categories.html | 24 ------------------------ _includes/posts/feed.html | 23 +++++++++++++++++++++++ _includes/posts/posts.html | 23 ----------------------- archive/index.html | 2 +- feed/index.html | 2 +- 7 files changed, 51 insertions(+), 51 deletions(-) create mode 100644 _includes/categories/all.html delete mode 100644 _includes/categories/categories.html create mode 100644 _includes/posts/feed.html delete mode 100644 _includes/posts/posts.html diff --git a/README.md b/README.md index 9da2a9b..b58787c 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,7 @@ Hide the link by setting `site.settings.navbar.github` to `false`. See [feed/index.html] for an example of how to easily create a paginated post feed. -Basically, just include posts/posts.html. +Basically, just include posts/feed.html. [feed/index.html]: feed/index.html @@ -126,7 +126,7 @@ parameter to the category's name. If you want to create a page with a list of all categories and the posts belonging to them, see [archive/index.html] for an example. -Simply including categories/categories.html should do the job. +Simply including categories/all.html should do the job. [archive/index.html]: archive/index.html diff --git a/_includes/categories/all.html b/_includes/categories/all.html new file mode 100644 index 0000000..a988a3f --- /dev/null +++ b/_includes/categories/all.html @@ -0,0 +1,24 @@ +{% if site.posts.size == 0 %} +

Sorry, no posts have been added yet.

+
+{% else %} + {% for category in site.categories %} +

{{ category[0] }}

+
+ + {% endfor %} + {% assign uncategorized = site.posts | where_exp: "post","post.categories.size == 0" %} + {% if uncategorized.size != 0 %} +

Other

+
+ + {% endif %} +{% endif %} diff --git a/_includes/categories/categories.html b/_includes/categories/categories.html deleted file mode 100644 index a988a3f..0000000 --- a/_includes/categories/categories.html +++ /dev/null @@ -1,24 +0,0 @@ -{% if site.posts.size == 0 %} -

Sorry, no posts have been added yet.

-
-{% else %} - {% for category in site.categories %} -

{{ category[0] }}

-
- - {% endfor %} - {% assign uncategorized = site.posts | where_exp: "post","post.categories.size == 0" %} - {% if uncategorized.size != 0 %} -

Other

-
- - {% endif %} -{% endif %} diff --git a/_includes/posts/feed.html b/_includes/posts/feed.html new file mode 100644 index 0000000..c123ceb --- /dev/null +++ b/_includes/posts/feed.html @@ -0,0 +1,23 @@ +{% if site.posts.size == 0 %} +

Sorry, no posts have been added yet.

+
+{% else %} + {% for post in paginator.posts %} +
+

{{ post.title }}

+ +
+ {{ post.excerpt | markdownify }} +
+ {% endfor %} +
+ {% include posts/paginator.html %} +
+{% endif %} diff --git a/_includes/posts/posts.html b/_includes/posts/posts.html deleted file mode 100644 index c123ceb..0000000 --- a/_includes/posts/posts.html +++ /dev/null @@ -1,23 +0,0 @@ -{% if site.posts.size == 0 %} -

Sorry, no posts have been added yet.

-
-{% else %} - {% for post in paginator.posts %} -
-

{{ post.title }}

- -
- {{ post.excerpt | markdownify }} -
- {% endfor %} -
- {% include posts/paginator.html %} -
-{% endif %} diff --git a/archive/index.html b/archive/index.html index eec97db..39f465d 100644 --- a/archive/index.html +++ b/archive/index.html @@ -5,4 +5,4 @@ navbar: link: true priority: 3 --- -{% include categories/categories.html %} +{% include categories/all.html %} diff --git a/feed/index.html b/feed/index.html index 42a5d53..3660a51 100644 --- a/feed/index.html +++ b/feed/index.html @@ -6,4 +6,4 @@ navbar: priority: 2 paginated: true --- -{% include posts/posts.html %} +{% include posts/feed.html %} -- cgit v1.2.3