diff --git a/layouts/index.html b/layouts/index.html index 202ad80..e508122 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -4,11 +4,12 @@ {{ define "content" }}
- {{ range (where .Data.Pages "Type" "not in" (slice "about" "portfolio")).GroupBy "Section" }} - {{ range .Pages }} + {{ $paginator := .Paginate (where .Data.Pages "Type" "posts") }} + {{ range $paginator.Pages }}
- {{ .Title }}{{ if .Draft }} {{ end }} + {{ .Title }} + {{ if .Draft }}{{ end }} {{ .Date.Format (.Site.Params.dateformat | default "Jan 02, 2006") }} @@ -19,20 +20,18 @@ {{ .Summary }} {{ end }} {{ if .Truncated }} - + ... {{ end }}
- {{ end }} {{ end }}
+ {{ partial "pagination.html" . }} {{ end }} {{ define "footer" }} -{{ if .Site.GoogleAnalytics }} - - {{ template "_internal/google_analytics_async.html" . }} -{{ end }} -{{ partial "footer/font-awesome-js.html" . }} + {{ if .Site.GoogleAnalytics }} + + {{ template "_internal/google_analytics_async.html" . }} + {{ end }} + {{ partial "footer/font-awesome-js.html" . }} {{ end }} diff --git a/layouts/partials/pagination.html b/layouts/partials/pagination.html new file mode 100644 index 0000000..7995061 --- /dev/null +++ b/layouts/partials/pagination.html @@ -0,0 +1,39 @@ +{{ $pag := $.Paginator }} +{{ if gt $pag.TotalPages 1 }} + +{{ end }} \ No newline at end of file