GithubHelp home page GithubHelp logo

Comments (3)

vasanthaganeshk avatar vasanthaganeshk commented on August 27, 2024

example test case:

main :: IO ()
main = do
  blg   <- BS.readFile "blog-config.yaml"
  
  let blogconfig = decodedstr blg
  hakyll $ do
    match "images/*" $ do
        route   idRoute
        compile copyFileCompiler

    match "css/*.scss" $ do
      route $ setExtension "css"
      let compressCssItem = fmap compressCss
      compile (compressCssItem <$> sassCompiler)

    match (fromList ["about.md", "contact.md"]) $ do
        route   $ setExtension "html"
                      
        compile $ pandocCompiler
            >>= loadAndApplyTemplate "templates/default.html" (defaultCTX blogconfig)
            >>= relativizeUrls


    match "posts/*" $ do
        route $ setExtension "html"
        compile $ pandocCompiler
            >>= loadAndApplyTemplate "templates/post.html"    (postCtx blogconfig)
            >>= loadAndApplyTemplate "templates/default.html" (postCtx blogconfig)
            >>= relativizeUrls

    create ["archive.html"] $ do
        route idRoute
        compile $ do
            posts <- recentFirst =<< loadAll "posts/*"
            
            makeItem ""
                >>= loadAndApplyTemplate "templates/archive.html" (archiveCtx posts blogconfig)
                >>= loadAndApplyTemplate "templates/default.html" (archiveCtx posts blogconfig)
                >>= relativizeUrls

    match "index.html" $ do
        route idRoute
        compile $ do
            posts <- recentFirst =<< loadAll "posts/*"
            
            getResourceBody
                >>= applyAsTemplate (indexCtx posts blogconfig)
                >>= loadAndApplyTemplate "templates/default.html" (indexCtx posts blogconfig)
                >>= relativizeUrls

    match "templates/*" $ compile templateBodyCompiler

hint: it also works only on the brackets

from haskell-interactive-mode.

vasanthaganeshk avatar vasanthaganeshk commented on August 27, 2024

A new PR has been sent to fix this issue

from haskell-interactive-mode.

vasanthaganeshk avatar vasanthaganeshk commented on August 27, 2024

fixed

from haskell-interactive-mode.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.