Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the collapse functionality does not work #1

Closed
vasanthaganeshk opened this issue Jun 8, 2017 · 3 comments
Closed

the collapse functionality does not work #1

vasanthaganeshk opened this issue Jun 8, 2017 · 3 comments
Labels

Comments

@vasanthaganeshk
Copy link
Owner

vasanthaganeshk commented Jun 8, 2017

  • is collapse needed?
  • if needed, write tests, fix code, probable fix in haskell-collapse.el
  • also, document this functionality
@vasanthaganeshk
Copy link
Owner Author

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

@vasanthaganeshk
Copy link
Owner Author

A new PR has been sent to fix this issue

@vasanthaganeshk
Copy link
Owner Author

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant