tintin-1.10.1: A softer alternative to Haddock

Safe HaskellNone
LanguageHaskell2010

Tintin.Render

Synopsis

Documentation

withContext :: [Page] -> [(Page, Context)] Source #

Pair up each page with context (next and previous links) by alphabetical order, excluding index page.

This function is a little more complicated than might be expected because the functionality is a little nuanced. It has to:

  1. Pair each page with next and previous links based on an alphabetical sorting, excluding the index page.
  2. Give the first non-index page, alphabetically, a "previous" link pointing to the index if it exists.
  3. Give the index, if it exists, a "next' link to the first non-index page.