From 172479cb0a9a53337da30312f076b4f0f1c009fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=A1=E6=A2=A6=E6=98=9F=E5=B0=98?= Date: Mon, 16 May 2022 09:22:39 +0800 Subject: [PATCH] :construction: Add pagination in home page. --- exampleSite/config.yaml | 2 ++ layouts/_default/baseof.html | 5 +--- layouts/index.html | 1 + layouts/partials/pages.html | 5 ---- layouts/partials/pagination.html | 42 ++++++++++++++++++++++++++++++++ 5 files changed, 46 insertions(+), 9 deletions(-) delete mode 100644 layouts/partials/pages.html create mode 100644 layouts/partials/pagination.html diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 3e59c1f..b91a925 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -5,6 +5,8 @@ baseURL: / theme: hugo-theme-next +paginate: 3 + #-------------------------------------- # Hugo multilingual settings #-------------------------------------- diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index fe39880..a0c4510 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -19,10 +19,7 @@ {{ partial "partials/header.html" . }}
- {{- block "main" . -}}{{- end -}} - + {{- block "main" . -}}{{- end -}}