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/" ...@@ -2,10 +2,10 @@ baseURL = "https://bwog-notes.chagratt.site/"
languageCode = "fr-fr" languageCode = "fr-fr"
DefaultContentLanguage = "fr" DefaultContentLanguage = "fr"
title = "BWog-notes" title = "BWog-notes"
paginate = 10
[params] [params]
section_on_frontpage = "posts" section_on_frontpage = "posts"
pagination_articles = 10
description = "Bloc notes en ligne sur l'administration système Linux et autres sujets liés" description = "Bloc notes en ligne sur l'administration système Linux et autres sujets liés"
author = "Chagratt" author = "Chagratt"
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
{{ with .OutputFormats.Get "RSS" }} {{ with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }} {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{ end }} {{ 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 }} {{ range $paginator.Pages }}
<item> <item>
<title>{{ .Title }}</title> <title>{{ .Title }}</title>
......
{{ partial "header.html" . }} {{ partial "header.html" . }}
<h1>Liste des articles > {{ .Title }}</h1> <h1>Liste des articles > {{ .Title }}</h1>
{{ range (.Paginator .Site.Params.pagination_articles).Pages }} {{ range .Paginator.Pages }}
<article> <article>
<header> <header>
<h1 class="articles-listing-title"> <h1 class="articles-listing-title">
......
{{ partial "header.html" . }} {{ partial "header.html" . }}
<h1>Liste des articles</h1> <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 }} {{ range $paginator.Pages }}
<article> <article>
<header> <header>
......
Supports Markdown
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