addBoilerplate :: String -> String -> Html -> Html
addBoilerplate current titleText bodyHtml =
  let headHtml = head $
                 title (fromString titleText) <>
                 link ! A.href (fromString $ relativise "style.css" current)
                      ! A.rel "stylesheet"
                      ! A.type_ "text/css"
      madeByHtml =
        H.div ! A.id "footer" $ hr
        <> "Generated by " <> (a ! A.href futhark_doc_url) "futhark-doc"
        <> " " <> fromString (showVersion version)
  in headHtml <> body (h1 (toHtml titleText) <> bodyHtml <> madeByHtml)
  where futhark_doc_url =
          "https://futhark.readthedocs.io/en/latest/man/futhark-doc.html"
addBoilerplate :: String -> String -> Html -> Html
addBoilerplate current titleText bodyHtml =
  let headHtml = head $
                 title (fromString titleText) <>
                 link ! A.href (fromString $ relativise "style.css" current)
                      ! A.rel "stylesheet"
                      ! A.type_ "text/css"
      madeByHtml =
        H.div ! A.id "footer" $ hr
        <> "Generated by " <> (a ! A.href futhark_doc_url) "futhark-doc"
        <> " " <> fromString (showVersion version)
  in headHtml <> body (h1 (toHtml titleText) <> bodyHtml <> madeByHtml)
  where futhark_doc_url =
          "https://futhark.readthedocs.io/en/latest/man/futhark-doc.html"
addBoilerplate current titleText bodyHtml =
  let headHtml = head $
                 title (fromString titleText) <>
                 link ! A.href (fromString $ relativise "style.css" current)
                      ! A.rel "stylesheet"
                      ! A.type_ "text/css"
      madeByHtml =
        H.div ! A.id "footer" $ hr
        <> "Generated by " <> (a ! A.href futhark_doc_url) "futhark-doc"
        <> " " <> fromString (showVersion version)
  in headHtml <> body (h1 (toHtml titleText) <> bodyHtml <> madeByHtml)
  where futhark_doc_url =
          "https://futhark.readthedocs.io/en/latest/man/futhark-doc.html"