diff --git a/exampleSite/config.toml b/exampleSite/config.toml index a9fafb0..3228fd1 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -14,6 +14,10 @@ pluralizelisttitles = false description = "Minimal, one page, theme for showcasing your work" message = "" hideAutoMenu = false + + # Pagination options + paginate = 3 + multipage = true [[menu.main]] name = "External" diff --git a/layouts/_default/section.html b/layouts/_default/section.html new file mode 100644 index 0000000..45253a7 --- /dev/null +++ b/layouts/_default/section.html @@ -0,0 +1,19 @@ +{{ define "main" }} + +
+
+ {{- partial "custom-message.html" . -}} + + + {{ .Scratch.Set "pages" .Paginator.Pages }} + + {{ if eq .Site.Params.multipage true }} + {{- partial "pagination.html" . -}} + {{ else }} + {{- partial "no-pagination.html" . -}} + {{ end }} + +
+
+ +{{ end }} \ No newline at end of file diff --git a/layouts/index.html b/layouts/index.html index a5e21fb..7963274 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -3,44 +3,16 @@
{{- partial "custom-message.html" . -}} + + {{ .Scratch.Set "pages" .Site.Pages }} + + {{ if eq .Site.Params.multipage true }} + {{- partial "pagination.html" . -}} + {{ else }} + {{- partial "no-pagination.html" . -}} + {{ end }} -
- {{ range where .Site.Pages "Kind" "page" }} - {{ if ne .Params.Exclude true }} - -
- {{ if (or .Params.Image .CurrentSection.Params.Image) }} - {{ .Title }} - {{ end }} - {{ title .Section }} -

- {{ .Title }} -

-

- {{ .Params.Subtitle }} -

-
-
- {{ end }} - {{ end }} -
-{{ end }} +{{ end }} \ No newline at end of file diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 6d8475a..39d8c7f 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -84,6 +84,12 @@