hugolib: Introduce Page.NextPage and Page.PrevPage
authorRicardo N Feliciano <FelicianoTech@gmail.com>
Mon, 24 Sep 2018 22:06:29 +0000 (18:06 -0400)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Wed, 26 Sep 2018 07:22:43 +0000 (09:22 +0200)
commitad705aac0649fa3102f7639bc4db65d45e108ee2
treeca4a1b132e422d529ed56bb4b9705a23e4f7ff86
parent52ac85fbc4d4066b5e13df454593597df0166262
hugolib: Introduce Page.NextPage and Page.PrevPage

Introduce new page position variables in order to fix the ordering issue
of `.Next` and `.Prev` while also allowing an upgrade path via
deprecation.

`.NextInSection` becomes `.NextPageInSection`.
`.PrevInSection` becomes `.PrevPageInSection`.

`.Next` becomes a function returning `.PrevPage`.
`.Prev` becomes a function returning `.NextPage`.

Fixes #1061
docs/content/en/variables/page.md
hugolib/hugo_sites_build_test.go
hugolib/page.go
hugolib/site.go