From dd066a27af9e51e7a3840a56813ba9a89872da05 Mon Sep 17 00:00:00 2001 From: MorrowM Date: Sun, 12 Dec 2021 03:42:44 +0200 Subject: [PATCH] Add redirect from Haskell Platform to Downloads --- builder/site.hs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/builder/site.hs b/builder/site.hs index a037769a..bf2f63ce 100644 --- a/builder/site.hs +++ b/builder/site.hs @@ -1,6 +1,7 @@ -------------------------------------------------------------------------------- -{-# LANGUAGE TypeApplications #-} {-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE TupleSections #-} +{-# LANGUAGE TypeApplications #-} import Data.Aeson import qualified Data.ByteString.Lazy as BL import Data.Monoid ((<>)) @@ -64,6 +65,7 @@ main = mkContext >>= \ctx -> hakyll $ do match "templates/*" $ compile templateCompiler + version "redirects" $ createRedirects haskellPlatformRedirects parseTestimonialCompiler :: Compiler (Item Testimonial) parseTestimonialCompiler = do @@ -111,3 +113,14 @@ testimonialContext = , field "shortTestimonial" (pure . shortTestimonial . itemBody) , field "companyURL" (pure . companyURL . itemBody) ] + +haskellPlatformRedirects :: [(Identifier, String)] +haskellPlatformRedirects = (, "/downloads") <$> + [ "platform/index.html" + , "platform/mac.html" + , "platform/linux.html" + , "platform/windows.html" + , "platform/prior.html" + , "platform/contents.html" + , "platform/download.html" + ]