diff options
Diffstat (limited to 'app/Main.hs')
| -rw-r--r-- | app/Main.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/Main.hs b/app/Main.hs index ec508d4..ea3ea01 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -17,6 +17,7 @@ import Hakyll.Aeson (yamlCompiler) import Hakyll.Paper (papersCompiler, mkPaperContext, FieldContext (..)) import Hakyll.TeX.BibTeX (bibtexCompiler) import Hakyll.Web.Sass +import Hakyll.Web.Redirect (createRedirects) import Text.Jasmine (minify) import WWW.Base (baseHakyll, domain, myHakyllWriterOptions, myHakyllReaderOptions) import WWW.Templates (myContext, defaultTemplate) @@ -92,6 +93,11 @@ main = do -- compile $ myPandocCompiler >>= applyAsTemplate baseCtxt >>= applyTemplate defaultTemplate baseCtxt compile $ getResourceBody >>= applyAsTemplate baseCtxt >>= myRenderPandoc >>= applyTemplate defaultTemplate baseCtxt + + createRedirects $ + [ ("teaching/books/index.html", "/books/index.html") + ] + match "www/links/index.md" $ do route $ dropParentRoute 1 `composeRoutes` setExtension ".html" compile $ getResourceBody >>= applyAsTemplate baseCtxt >>= myRenderPandoc >>= applyTemplate defaultTemplate baseCtxt |
