|
1 | 1 | --------------------------------------------------------------------------------
|
2 |
| -{-# LANGUAGE TypeApplications #-} |
3 | 2 | {-# LANGUAGE OverloadedStrings #-}
|
| 3 | +{-# LANGUAGE TupleSections #-} |
| 4 | +{-# LANGUAGE TypeApplications #-} |
4 | 5 | import Data.Aeson
|
5 | 6 | import qualified Data.ByteString.Lazy as BL
|
6 | 7 | import Data.Monoid ((<>))
|
@@ -64,6 +65,7 @@ main = mkContext >>= \ctx -> hakyll $ do
|
64 | 65 | match "templates/*" $
|
65 | 66 | compile templateCompiler
|
66 | 67 |
|
| 68 | + version "redirects" $ createRedirects haskellPlatformRedirects |
67 | 69 |
|
68 | 70 | parseTestimonialCompiler :: Compiler (Item Testimonial)
|
69 | 71 | parseTestimonialCompiler = do
|
@@ -111,3 +113,14 @@ testimonialContext =
|
111 | 113 | , field "shortTestimonial" (pure . shortTestimonial . itemBody)
|
112 | 114 | , field "companyURL" (pure . companyURL . itemBody)
|
113 | 115 | ]
|
| 116 | + |
| 117 | +haskellPlatformRedirects :: [(Identifier, String)] |
| 118 | +haskellPlatformRedirects = (, "/downloads") <$> |
| 119 | + [ "platform/index.html" |
| 120 | + , "platform/mac.html" |
| 121 | + , "platform/linux.html" |
| 122 | + , "platform/windows.html" |
| 123 | + , "platform/prior.html" |
| 124 | + , "platform/contents.html" |
| 125 | + , "platform/download.html" |
| 126 | + ] |
0 commit comments