From 3a602756ba91e06ea49dc852452e8a2902105abe Mon Sep 17 00:00:00 2001 From: Mimi <1119186082@qq.com> Date: Wed, 25 Dec 2024 14:45:51 +0800 Subject: [PATCH] feat: remove pagination variable (#95) --- layout/_partial/archive.ejs | 45 ++++++++++++++++--------------------- layout/archive.ejs | 2 +- layout/category.ejs | 2 +- layout/tag.ejs | 2 +- 4 files changed, 22 insertions(+), 29 deletions(-) diff --git a/layout/_partial/archive.ejs b/layout/_partial/archive.ejs index a957af7..7c0a87f 100644 --- a/layout/_partial/archive.ejs +++ b/layout/_partial/archive.ejs @@ -9,33 +9,26 @@ if (page.archive){ %>

<%= title %>

-<% if (pagination == 2){ %> +
<% page.posts.each(function(item){ %> - <%- partial('article', {item: item, index: true}) %> - <% }); %> - -<% } else { %> -
- <% page.posts.each(function(item){ %> -
+ + <% }); %> +
-<%- partial('pagination') %> \ No newline at end of file +<%- partial('pagination') %> diff --git a/layout/archive.ejs b/layout/archive.ejs index 922c388..c0cdb27 100644 --- a/layout/archive.ejs +++ b/layout/archive.ejs @@ -1 +1 @@ -<%- partial('_partial/archive', {pagination: config.archive}) %> \ No newline at end of file +<%- partial('_partial/archive') %> \ No newline at end of file diff --git a/layout/category.ejs b/layout/category.ejs index 47957f3..c0cdb27 100644 --- a/layout/category.ejs +++ b/layout/category.ejs @@ -1 +1 @@ -<%- partial('_partial/archive', {pagination: config.category}) %> \ No newline at end of file +<%- partial('_partial/archive') %> \ No newline at end of file diff --git a/layout/tag.ejs b/layout/tag.ejs index 3c6a775..c0cdb27 100644 --- a/layout/tag.ejs +++ b/layout/tag.ejs @@ -1 +1 @@ -<%- partial('_partial/archive', {pagination: config.tag}) %> \ No newline at end of file +<%- partial('_partial/archive') %> \ No newline at end of file