Commit a704941d authored by wbar's avatar wbar
Browse files

remove pagination hugly hacks

parent 85e43306
......@@ -2,10 +2,10 @@ baseURL = "https://bwog-notes.chagratt.site/"
languageCode = "fr-fr"
DefaultContentLanguage = "fr"
title = "BWog-notes"
paginate = 10
[params]
section_on_frontpage = "posts"
pagination_articles = 10
description = "Bloc notes en ligne sur l'administration système Linux et autres sujets liés"
author = "Chagratt"
......
......@@ -12,7 +12,7 @@
{{ with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{ end }}
{{ $paginator := .Paginate (where .Site.RegularPages "Section" "in" .Site.Params.section_on_frontpage ) .Site.Params.pagination_articles }}
{{ $paginator := .Paginate (where .Site.RegularPages "Section" "in" .Site.Params.section_on_frontpage ) }}
{{ range $paginator.Pages }}
<item>
<title>{{ .Title }}</title>
......
{{ partial "header.html" . }}
<h1>Liste des articles > {{ .Title }}</h1>
{{ range (.Paginator .Site.Params.pagination_articles).Pages }}
{{ range .Paginator.Pages }}
<article>
<header>
<h1 class="articles-listing-title">
......
{{ partial "header.html" . }}
<h1>Liste des articles</h1>
{{ $paginator := .Paginate (where .Site.RegularPages "Section" "in" .Site.Params.section_on_frontpage ) .Site.Params.pagination_articles }}
{{ $paginator := .Paginate (where .Site.RegularPages "Section" "in" .Site.Params.section_on_frontpage ) }}
{{ range $paginator.Pages }}
<article>
<header>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment