Git Product home page Git Product logo

hakyll's Introduction

hakyll

CI

Hakyll is a static site generator library in Haskell. More information (including a tutorial) can be found on the hakyll homepage.

You can install this library using cabal:

cabal install hakyll

Or using stack:

stack install hakyll

If Stack fails, please see which Stackage snapshots contain Hakyll and specify one explicitly, e.g. stack install --resolver=lts-19.0 hakyll.

hakyll's People

Contributors

beastaugh avatar bergmark avatar bergus avatar chrisdotcode avatar christopheryoung avatar crodjer avatar felixonmars avatar frasertweedale avatar hexirp avatar ian-ross avatar jaspervdj avatar jhmcstanton avatar krsch avatar l-tchen avatar laurentrdc avatar lortabac avatar malteneuss avatar mcmtroffaes avatar minoru avatar nagisa avatar nicolerauch avatar piyush-kurur avatar raindev avatar rpearce avatar samgd avatar seschwar avatar sol avatar sphynx avatar stoltene2 avatar uu1101 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hakyll's Issues

access to tag cloud from post rendering

Hi,

our blog print posts tags in the layout : http://blog.demotera.com

Therefore, post rendering depends on tags extraction. However, with the "tagblog" example, tag extraction depends on post rendering. There is therefore a cycle and I don't know how to deal with that.

Regards,

GPL

Hey, I noticed that the Web module contains a reference to Pandoc. Since Pandoc is GPL, shouldn't hakyll itself be GPL?

Would Hakyll work without Pandoc?

Not trying to be mean, just want to honor the license.

Thanks

"<>" in source code rendering

Hello,

I just notice an issue. For example, the "cstdio" in the following markdown source will disappear in a resulted HTML page. I have to insert space like "< cstdio >" to have it displayed. I am not sure whether this was caused by hakyll or pandoc.
Thanks for any ideas about this.

#include <cstdio>
int main()
{
#pragma omp parallel
    {
        printf( "Thread\n" );
    }
    return 0;
}

Extension switch

Implement a general switch that can choose a Compiler based on extension. Usage scenario:

main :: IO ()
main = hakyll $ do
    let fileErr s = arr (\f -> error $ s ++ " " ++ f)

    route   "static/css/**" $ setExtension "css"
    compile "static/css/**" $ proc res -> do
        identifier <- getIdentifier -< res
        let fp = toFilePath identifier
        case takeExtension fp of
            ".css"  -> getResourceString -< res
            ".scss" -> sass -< res
            _       -> fileErr "Not a (S)CSS file." -< toFilePath identifier

sass :: Compiler Resource String
sass = getResourceString >>> unixFilter "sass" ["-s", "--scss"]
                         >>> arr compressCss

LastModified variable

Readers frequently want a date; for a blog post it's fine to simply list the creation date, but for everything else, the last-modified date (mtime) is the relevant piece of information. How many years since this was last touched? A reader recently criticized gwern.net for not providing this information, and I agreed, it's something I've been meaning to ask for a while.

I experimented with a little gnarly code to get the last revision date from Filestore and pass that into the Hakyll renderer, but better would be the default Hakyll compiler populating that, like it populates the $description$ field and a few others. Ideally, I could just pop $lastModified$ into my template and rebuild.

(Implementation-wise, I'd guess you might modify File.hs to return the file contents and also the result of getModificationTime on that file.)

tagblog compile error

I'm sorry- first time I've touched Haskell so I can't really do anything beyond just dumping the error msg...

hakyll.hs:55:28:
Couldn't match expected type M.Map k a' against inferred type[(String, [Page a1])]'
In the second argument of (.)', namelytagsMap'
In the first argument of arr', namely(M.toList . tagsMap)'
In the first argument of (>>>)', namelyarr (M.toList . tagsMap)

concurrency does not actually speed things up, but slows them down

With HEAD, made following change:

  •    mapM_ (render' ["templates/default.html"]) (articles++sources)
    
  •    concurrentHakyll $ map (render' ["templates/default.html"]) (articles++sources)
    

Compiling with -threaded and -O2, ./hakyll rebuild +RTS -N4 -RTS takes >3 minutes, while ./hakyll rebuild takes 1.2 minutes. This relationship is the exact opposite of what it ought to be.

Hakyll seems to eat a tag

When using the setup here, the tag <div id="layer2"> seems to get eaten.
The tag is present in the file index.html but not in the resulting file _site/index.html.

Jekyll-like configuration

The cool thing about the Jekyll static site generator is that it's configuration is minimal. However, we can have the same thing in Hakyll. We just need to implement something like:

main = hakyll jekyllConfiguration

or

main = hakyll $ jekyllConfigurationWith ... some options ...

hakyll server reply "not found" if request has GET params

Hi Jasper,

in the process of moving toward 3.1, I can't use the (in)famous trick of adding a timestamp request parameter to my CSS/JS ressource links to avoid browser cache issues. In short, this trick consists of adding a timestamp (last website compilation in my case) to ressources links like so :

and setting an unlimited cache validity to the ressource.

Since 3.1 however, the webserver fired by "hakyll server" refuses to serve pages with a dumb request parameter, so I can't use "hakyll server" in development. That's a minor issue though, since setting up a nginx or lighttpd server for that is trivial.

FWIW, I much prefer the new design of Hakyll 3, and our website codebase seriously shrunk. Thank you very much for this release !

Smarter $title support

One person has complained to me that http://www.gwern.net/ sets the same <title> value on each page ('Joining Clouds') and so their bookmarks all look the same and it is harder for them to navigate.

I tried putting $title back into the template but since none of my pages have a specific metadata section, the $titles were simply rendered literally.

Each of my files lives at its name++".page", so while I could write a shell loop to prefix a metadata block to all 100+ pages and then darcs record each page separately (so as to not introduce spurious dependencies), I really would prefer not to. It clutters up the articles with redundant information, and I honor the DRY god.

Currently Hakyll provides functions to change metadata values inside a Context, such as $page, but it doesn't seem to provide any way to get the original file name of a a page, so I cannot do something like '>>> \pagename -> changeValue "title" (dropSuffix pagename)'.

What would be very nice is if Hakyll could automatically do something like this pseudocode: 'if isRenderable x && null (title x) then changeValue ....'

Hakyll FAQ should incorporate changes in Pandoc 1.9

The FAQ says:

Syntax highlighting is enabled by default in Hakyll. However, you also need to enable it in pandoc.

However, since Pandoc 1.9, syntax highlighting is enabled automatically and there is no -fhighlight option (pandoc.cabal).

I'm not sure if the paragraph should be removed (1.9 was uploaded in February) or rewritten to mention this change.

Could not find module `Hakyll.Core.Resource.Provider.Dummy'hakyll 3.2.7.2:

$ tar xf hakyll-3.2.7.2.tar.gz
$ cd hakyll-3.2.7.2
$ runhaskell Setup.hs configure --enable-tests
$ runhaskell Setup.hs build
[...]
Preprocessing test suite 'hakyll-tests' for hakyll-3.2.7.2...

tests/Hakyll/Core/UnixFilter/Tests.hs:15:8:
    Could not find module `Hakyll.Core.Resource.Provider.Dummy'
    Perhaps you meant
      Hakyll.Core.Resource.Provider.File (needs flag -package hakyll-3.2.7.2)
      Hakyll.Core.Resource.Provider (needs flag -package hakyll-3.2.7.2)
    Use -v to see a list of the files searched for.

support pandoc 1.9

I realize this may not be possible/easy until Pandoc 1.9 is actually released. I've been using the development instructions. Personally, I'm using it to get Clojure syntax highlighting. When I try to install Hakyll from cabal, I get these dependency errors:

cabal: cannot configure attoparsec-0.10.1.0. It requires text >=0.11.1.5
For the dependency on text >=0.11.1.5 there are these packages: text-0.11.1.5,
text-0.11.1.6, text-0.11.1.7, text-0.11.1.8, text-0.11.1.9, text-0.11.1.10,
text-0.11.1.11 and text-0.11.1.12. However none of them are available.
text-0.11.1.5 was excluded because xml-1.3.10 requires text ==0.11.0.6
text-0.11.1.5 was excluded because text-0.11.0.6 was selected instead
text-0.11.1.5 was excluded because texmath-0.5.0.1 requires text ==0.11.0.6
text-0.11.1.5 was excluded because test-framework-quickcheck2-0.2.10 requires
text ==0.11.0.6
text-0.11.1.5 was excluded because test-framework-hunit-0.2.6 requires text
==0.11.0.6
text-0.11.1.5 was excluded because test-framework-0.4.2.0 requires text
==0.11.0.6
text-0.11.1.5 was excluded because tagsoup-0.12.6 requires text ==0.11.0.6
text-0.11.1.5 was excluded because highlighting-kate-0.4 requires text
==0.11.0.6
text-0.11.1.5 was excluded because citeproc-hs-0.3.4 requires text ==0.11.0.6
text-0.11.1.5 was excluded because blaze-html-0.4.3.1 requires text ==0.11.0.6
text-0.11.1.5 was excluded because blaze-builder-0.3.0.2 requires text
==0.11.0.6
text-0.11.1.5 was excluded because pandoc-1.9 requires text ==0.11.0.6
text-0.11.1.6 was excluded because xml-1.3.10 requires text ==0.11.0.6
text-0.11.1.6 was excluded because text-0.11.0.6 was selected instead
text-0.11.1.6 was excluded because texmath-0.5.0.1 requires text ==0.11.0.6
text-0.11.1.6 was excluded because test-framework-quickcheck2-0.2.10 requires
text ==0.11.0.6
text-0.11.1.6 was excluded because test-framework-hunit-0.2.6 requires text
==0.11.0.6
text-0.11.1.6 was excluded because test-framework-0.4.2.0 requires text
==0.11.0.6
text-0.11.1.6 was excluded because tagsoup-0.12.6 requires text ==0.11.0.6
text-0.11.1.6 was excluded because highlighting-kate-0.4 requires text
==0.11.0.6
text-0.11.1.6 was excluded because citeproc-hs-0.3.4 requires text ==0.11.0.6
text-0.11.1.6 was excluded because blaze-html-0.4.3.1 requires text ==0.11.0.6
text-0.11.1.6 was excluded because blaze-builder-0.3.0.2 requires text
==0.11.0.6
text-0.11.1.6 was excluded because pandoc-1.9 requires text ==0.11.0.6
text-0.11.1.7 was excluded because xml-1.3.10 requires text ==0.11.0.6
text-0.11.1.7 was excluded because text-0.11.0.6 was selected instead
text-0.11.1.7 was excluded because texmath-0.5.0.1 requires text ==0.11.0.6
text-0.11.1.7 was excluded because test-framework-quickcheck2-0.2.10 requires
text ==0.11.0.6
text-0.11.1.7 was excluded because test-framework-hunit-0.2.6 requires text
==0.11.0.6
text-0.11.1.7 was excluded because test-framework-0.4.2.0 requires text
==0.11.0.6
text-0.11.1.7 was excluded because tagsoup-0.12.6 requires text ==0.11.0.6
text-0.11.1.7 was excluded because highlighting-kate-0.4 requires text
==0.11.0.6
text-0.11.1.7 was excluded because citeproc-hs-0.3.4 requires text ==0.11.0.6
text-0.11.1.7 was excluded because blaze-html-0.4.3.1 requires text ==0.11.0.6
text-0.11.1.7 was excluded because blaze-builder-0.3.0.2 requires text
==0.11.0.6
text-0.11.1.7 was excluded because pandoc-1.9 requires text ==0.11.0.6
text-0.11.1.8 was excluded because xml-1.3.10 requires text ==0.11.0.6
text-0.11.1.8 was excluded because text-0.11.0.6 was selected instead
text-0.11.1.8 was excluded because texmath-0.5.0.1 requires text ==0.11.0.6
text-0.11.1.8 was excluded because test-framework-quickcheck2-0.2.10 requires
text ==0.11.0.6
text-0.11.1.8 was excluded because test-framework-hunit-0.2.6 requires text
==0.11.0.6
text-0.11.1.8 was excluded because test-framework-0.4.2.0 requires text
==0.11.0.6
text-0.11.1.8 was excluded because tagsoup-0.12.6 requires text ==0.11.0.6
text-0.11.1.8 was excluded because highlighting-kate-0.4 requires text
==0.11.0.6
text-0.11.1.8 was excluded because citeproc-hs-0.3.4 requires text ==0.11.0.6
text-0.11.1.8 was excluded because blaze-html-0.4.3.1 requires text ==0.11.0.6
text-0.11.1.8 was excluded because blaze-builder-0.3.0.2 requires text
==0.11.0.6
text-0.11.1.8 was excluded because pandoc-1.9 requires text ==0.11.0.6
text-0.11.1.9 was excluded because xml-1.3.10 requires text ==0.11.0.6
text-0.11.1.9 was excluded because text-0.11.0.6 was selected instead
text-0.11.1.9 was excluded because texmath-0.5.0.1 requires text ==0.11.0.6
text-0.11.1.9 was excluded because test-framework-quickcheck2-0.2.10 requires
text ==0.11.0.6
text-0.11.1.9 was excluded because test-framework-hunit-0.2.6 requires text
==0.11.0.6
text-0.11.1.9 was excluded because test-framework-0.4.2.0 requires text
==0.11.0.6
text-0.11.1.9 was excluded because tagsoup-0.12.6 requires text ==0.11.0.6
text-0.11.1.9 was excluded because highlighting-kate-0.4 requires text
==0.11.0.6
text-0.11.1.9 was excluded because citeproc-hs-0.3.4 requires text ==0.11.0.6
text-0.11.1.9 was excluded because blaze-html-0.4.3.1 requires text ==0.11.0.6
text-0.11.1.9 was excluded because blaze-builder-0.3.0.2 requires text
==0.11.0.6
text-0.11.1.9 was excluded because pandoc-1.9 requires text ==0.11.0.6
text-0.11.1.10 was excluded because xml-1.3.10 requires text ==0.11.0.6
text-0.11.1.10 was excluded because text-0.11.0.6 was selected instead
text-0.11.1.10 was excluded because texmath-0.5.0.1 requires text ==0.11.0.6
text-0.11.1.10 was excluded because test-framework-quickcheck2-0.2.10 requires
text ==0.11.0.6
text-0.11.1.10 was excluded because test-framework-hunit-0.2.6 requires text
==0.11.0.6
text-0.11.1.10 was excluded because test-framework-0.4.2.0 requires text
==0.11.0.6
text-0.11.1.10 was excluded because tagsoup-0.12.6 requires text ==0.11.0.6
text-0.11.1.10 was excluded because highlighting-kate-0.4 requires text
==0.11.0.6
text-0.11.1.10 was excluded because citeproc-hs-0.3.4 requires text ==0.11.0.6
text-0.11.1.10 was excluded because blaze-html-0.4.3.1 requires text
==0.11.0.6
text-0.11.1.10 was excluded because blaze-builder-0.3.0.2 requires text
==0.11.0.6
text-0.11.1.10 was excluded because pandoc-1.9 requires text ==0.11.0.6
text-0.11.1.11 was excluded because xml-1.3.10 requires text ==0.11.0.6
text-0.11.1.11 was excluded because text-0.11.0.6 was selected instead
text-0.11.1.11 was excluded because texmath-0.5.0.1 requires text ==0.11.0.6
text-0.11.1.11 was excluded because test-framework-quickcheck2-0.2.10 requires
text ==0.11.0.6
text-0.11.1.11 was excluded because test-framework-hunit-0.2.6 requires text
==0.11.0.6
text-0.11.1.11 was excluded because test-framework-0.4.2.0 requires text
==0.11.0.6
text-0.11.1.11 was excluded because tagsoup-0.12.6 requires text ==0.11.0.6
text-0.11.1.11 was excluded because highlighting-kate-0.4 requires text
==0.11.0.6
text-0.11.1.11 was excluded because citeproc-hs-0.3.4 requires text ==0.11.0.6
text-0.11.1.11 was excluded because blaze-html-0.4.3.1 requires text
==0.11.0.6
text-0.11.1.11 was excluded because blaze-builder-0.3.0.2 requires text
==0.11.0.6
text-0.11.1.11 was excluded because pandoc-1.9 requires text ==0.11.0.6
text-0.11.1.12 was excluded because xml-1.3.10 requires text ==0.11.0.6
text-0.11.1.12 was excluded because text-0.11.0.6 was selected instead
text-0.11.1.12 was excluded because texmath-0.5.0.1 requires text ==0.11.0.6
text-0.11.1.12 was excluded because test-framework-quickcheck2-0.2.10 requires
text ==0.11.0.6
text-0.11.1.12 was excluded because test-framework-hunit-0.2.6 requires text
==0.11.0.6
text-0.11.1.12 was excluded because test-framework-0.4.2.0 requires text
==0.11.0.6
text-0.11.1.12 was excluded because tagsoup-0.12.6 requires text ==0.11.0.6
text-0.11.1.12 was excluded because highlighting-kate-0.4 requires text
==0.11.0.6
text-0.11.1.12 was excluded because citeproc-hs-0.3.4 requires text ==0.11.0.6
text-0.11.1.12 was excluded because blaze-html-0.4.3.1 requires text
==0.11.0.6
text-0.11.1.12 was excluded because blaze-builder-0.3.0.2 requires text
==0.11.0.6
text-0.11.1.12 was excluded because pandoc-1.9 requires text ==0.11.0.6

snap-server-0.5.* no longer exports ConfigListen, addListen

Restricting to build with snap-server-0.4.* allows building, but Snap.Http.Server.Config no longer exports ConfigListen(..); Hakyll/Web/Preview/Server.hs:19:27
or addListen; Hakyll/Web/Preview/Server.hs:18:65

so with current hakyll-3.2.0.1 cabal file and code doesn't build.

building on ghc 7.5 head get missing cabal dependency error

Hey Jasper,
I'm trying out building a bunch of stuff on ghc 7.5 head,
and i see that when building hakyll (after massaging all of its dependencies)

that I get the following error

carter Downloads/hakyll-3.2.7.2 » cabal build
Building hakyll-3.2.7.2...
Preprocessing library hakyll-3.2.7.2...

src/Hakyll/Core/Writable.hs:13:8:
Could not find module Text.Blaze.Renderer.String' It is a member of the hidden packageblaze-markup-0.5.1.0'.
Perhaps you need to add `blaze-markup' to the build-depends in your .cabal file.
Use -v to see a list of the files searched for.

thoughts on what this is? an ommision in the cabal file or something on the ghc side?

brochure.zip is outdated

hakyll/examples/hakyll/examples/brochure.zip is outdated and does not compile anymore. I think this true for the other ZIPs, too.

Cannot compile hakyll.hs on Mac OS: case insensitive file name

I'm finding that I cannot compile my hakyll.hs file on Mac OS. I get the following response:

Hakyll.hs:1:1:
    File name does not match module name:
    Saw: `Main'
    Expected: `Hakyll'

According to this thread, it's an issue with the file system's case insensitivity. Whatever the cause, is there a recommended way to get around this issue?

A class="foo" element in <img> tag is not parsed correctly!

Hi,
First of all i would like to thank for this great project!
I have just ported my simple website (source available at http://www.github.com/yiannist/hakyll-website) to Hakyll 3.0 and it seems to me that the class element of an html img-tag is not parsed correctly as it does not appear in compiled files (html generated).

Particularly, my hakyll-website/index.html file has an image like:
That's me!
though in the _site/index.html file generated the same tag appears as:
That's me!

I think there might be a bug here!

delete resource politics

getDependency goes error if the dependency is not found. I think it should give up the compilation of the requesting target, logging the problem. It's not a program failure if a part of the site is not compilable, the good part should be done. Is it ok to use maybe or MaybeT?

Reusing resources at different types

I'm not sure whether this is actually a bug/issue or just something I don't know how to do. But at any rate my question is here:

http://hpaste.org/46899/hakyll_question

Essentially, it boils down to wanting to do two different things with the same file resources, and running into cache type errors. I looked for a way to "rename" some resources but haven't figured out a way (yet). If I figure something out I'll post my solution here.

install: Could not find module `Text.Parsec.String'

Hello,
this is from a completely fresh install of haskell and cabal install hakyll:
stderr:
src/Hakyll/Web/Page/Read.hs:13:7:
Could not find module `Text.Parsec.String':
Use -v to see a list of the files searched for.
cabal: Error: some packages failed to install:
hakyll-3.2.5.0 failed during the building phase. The exception was:
ExitFailure 1

stdout:
Reading available packages...
Resolving dependencies...
In order, the following would be installed:
hakyll-3.2.5.0 (new package)
Extracting
/home/ralf/.cabal/packages/hackage.haskell.org/hakyll/3.2.5.0/hakyll-3.2.5.0.tar.gz
to /tmp/hakyll-3.2.5.019335...
Configuring hakyll-3.2.5.0...
Flags chosen: previewserver=True
Dependency base ==4.2.0.2: using base-4.2.0.2
Dependency binary ==0.5.1.0: using binary-0.5.1.0
Dependency blaze-html ==0.4.3.1: using blaze-html-0.4.3.1
Dependency bytestring ==0.9.1.7: using bytestring-0.9.1.7
Dependency citeproc-hs ==0.3.4: using citeproc-hs-0.3.4
Dependency containers ==0.3.0.0: using containers-0.3.0.0
Dependency cryptohash ==0.7.4: using cryptohash-0.7.4
Dependency directory ==1.0.1.1: using directory-1.0.1.1
Dependency filepath ==1.1.0.4: using filepath-1.1.0.4
Dependency hamlet ==0.10.7.1: using hamlet-0.10.7.1
Dependency mtl ==2.0.1.0: using mtl-2.0.1.0
Dependency old-locale ==1.0.0.2: using old-locale-1.0.0.2
Dependency old-time ==1.0.0.5: using old-time-1.0.0.5
Dependency pandoc ==1.8.2.1: using pandoc-1.8.2.1
Dependency parsec ==2.1.0.1: using parsec-2.1.0.1
Dependency process ==1.0.1.3: using process-1.0.1.3
Dependency regex-base ==0.93.2: using regex-base-0.93.2
Dependency regex-pcre ==0.94.2: using regex-pcre-0.94.2
Dependency snap-core ==0.7.0.1: using snap-core-0.7.0.1
Dependency snap-server ==0.7.0.1: using snap-server-0.7.0.1
Dependency tagsoup ==0.12.6: using tagsoup-0.12.6
Dependency time ==1.1.4: using time-1.1.4
Dependency unix ==2.4.0.2: using unix-2.4.0.2
Using Cabal-1.10.2.0 compiled by ghc-6.12
Using compiler: ghc-6.12.3
Using install prefix: /home/ralf/.cabal
Binaries installed in: /home/ralf/.cabal/bin
Libraries installed in: /home/ralf/.cabal/lib/hakyll-3.2.5.0/ghc-6.12.3
Private binaries installed in: /home/ralf/.cabal/libexec
Data files installed in: /home/ralf/.cabal/share/hakyll-3.2.5.0
Documentation installed in: /home/ralf/.cabal/share/doc/hakyll-3.2.5.0
No alex found
Using ar found on system at: /usr/bin/ar
No c2hs found
No cpphs found
No ffihugs found
Using gcc version 4.5.3 found on system at: /usr/bin/gcc
Using ghc version 6.12.3 found on system at: /usr/bin/ghc
Using ghc-pkg version 6.12.3 found on system at: /usr/bin/ghc-pkg
No greencard found
No haddock found
No happy found
No hmake found
Using hsc2hs version 0.67 found on system at: /usr/bin/hsc2hs
No hscolour found
No hugs found
No jhc found
Using ld found on system at: /usr/bin/ld
No lhc found
No lhc-pkg found
No nhc98 found
Using pkg-config version 0.26 found on system at: /usr/bin/pkg-config
Using ranlib found on system at: /usr/bin/ranlib
Using strip found on system at: /usr/bin/strip
Using tar found on system at: /bin/tar
No uhc found
creating dist/build
creating dist/build/autogen
Preprocessing library hakyll-3.2.5.0...
Building hakyll-3.2.5.0...
Building library...
creating dist/build
/usr/bin/ghc --make -package-name hakyll-3.2.5.0 -hide-all-packages -fbuilding-cabal-package -i -idist/build -isrc -idist/build/autogen -Idist/build/autogen -Idist/build -optP-DPREVIEW_SERVER -optP-include -optPdist/build/autogen/cabal_macros.h -odir dist/build -hidir dist/build -stubdir dist/build -package-id base-4.2.0.2-d09520f27d14dc38c6981fa942393083 -package-id binary-0.5.1.0-275faedc1a6153de0dfa6f8d1c9fa2d1 -package-id blaze-html-0.4.3.1-53680e1f239302952b3958449579a796 -package-id bytestring-0.9.1.7-253db8fad875ae549d30aec0d8553adf -package-id citeproc-hs-0.3.4-888e2fcac139937c85e6cc6247aca78c -package-id containers-0.3.0.0-7be04792060ce1514c52e2cb13a5c18a -package-id cryptohash-0.7.4-6c1e4d69d17f80fb29459f9df081b718 -package-id directory-1.0.1.1-fcaf1f7664193e0ad39e183ab8696baa -package-id filepath-1.1.0.4-1425f312faf5b8e9f4babf887e252326 -package-id hamlet-0.10.7.1-f320a20a00d1d674c67129b402421d90 -package-id mtl-2.0.1.0-3f9e375da935e2a5248eaad918c634c8 -package-id old-locale-1.0.0.2-0c1a4b40f2d3b9f6b725f54c00fe0923 -package-id old-time-1.0.0.5-0817229402cc197a28b131e3c166e70a -package-id pandoc-1.8.2.1-25903e87bc9a9dbb7630f99b9f3e5c2e -package-id parsec-2.1.0.1-c6e83e30d9fda47f2ab2500a586f7f71 -package-id process-1.0.1.3-b553ffb533a7014d695ce14e638736d9 -package-id regex-base-0.93.2-f9bf1f97578d24359be49e825df87a6c -package-id regex-pcre-0.94.2-8fa99e37d41a9659e92e3c6bc7b2fcc1 -package-id snap-core-0.7.0.1-e6d37c13dc40f5dc0fd40d37ce072783 -package-id snap-server-0.7.0.1-73c2daa6d383c0a532a87041ecb20c58 -package-id tagsoup-0.12.6-fd6ce3bca3fc4c504584f5adb1a9d73c -package-id time-1.1.4-668ce7f110e803952c4ceda6e172096c -package-id unix-2.4.0.2-e3baeba2eb8b4920935a68a330c886c6 -O -Wall Hakyll Hakyll.Core.CompiledItem Hakyll.Core.Compiler Hakyll.Core.Configuration Hakyll.Core.DependencyAnalyzer Hakyll.Core.DirectedGraph Hakyll.Core.DirectedGraph.Dot Hakyll.Core.Identifier Hakyll.Core.Identifier.Pattern Hakyll.Core.Logger Hakyll.Core.Resource Hakyll.Core.Resource.Provider Hakyll.Core.Resource.Provider.File Hakyll.Core.Routes Hakyll.Core.Rules Hakyll.Core.Run Hakyll.Core.Store Hakyll.Core.UnixFilter Hakyll.Core.Util.Arrow Hakyll.Core.Util.File Hakyll.Core.Util.String Hakyll.Core.Writable Hakyll.Core.Writable.CopyFile Hakyll.Core.Writable.WritableTuple Hakyll.Main Hakyll.Web.Blaze Hakyll.Web.CompressCss Hakyll.Web.Feed Hakyll.Web.Page Hakyll.Web.Page.List Hakyll.Web.Page.Metadata Hakyll.Web.Page.Read Hakyll.Web.Pandoc Hakyll.Web.Pandoc.Biblio Hakyll.Web.Pandoc.FileType Hakyll.Web.Tags Hakyll.Web.Template Hakyll.Web.Template.Read Hakyll.Web.Urls Hakyll.Web.Urls.Relativize Hakyll.Web.Util.Html Hakyll.Web.Preview.Poll Hakyll.Web.Preview.Server Hakyll.Core.Compiler.Internal Hakyll.Core.DirectedGraph.Internal Hakyll.Core.Rules.Internal Hakyll.Web.Page.Internal Hakyll.Web.Template.Internal Hakyll.Web.Template.Read.Hakyll Hakyll.Web.Template.Read.Hamlet Paths_hakyll
World file is already up to date.

Text.Regex on Snow Leopard

There appears to be a problem with Text.Regex under Snow Leopard. More information can be found in this thread. It is yet unknown wether this is a bug in Hakyll or in regex-compat.

atom feeds don't validate

Modifying the feed blog example to generate an atom feed produces something that fails the W3C feed validator service.

Here's the modified code

-- Render RSS feed
match  "rss.xml" $ route idRoute
create "rss.xml" $
    requireAll_ "posts/*" >>> renderRss feedConfiguration


match  "atom.xml" $ route idRoute
create "atom.xml" $
    requireAll_ "posts/*" >>> renderAtom feedConfiguration

multi-part body as in 2.x branch

In branch 2.x, it is possible to split the body of a page into several parts with specific keys, such as

this is my body

--- sidenote

this is something else

Such a feature allows one to write neat templates with content displayed in several parts.
Unfortunately, this feature dispeared in the 3.x branch.

This feature is really convenient and I don't really see another way to achieve this result with such simplicity.

Certain unicode characters in content make Hakyll crash

Can easily reproduced by putting one of the following characters in examples/brochure/about.markdown: 碁□◼◻◾◽▪▫�

$ cd examples/brochure
$ runhaskell hakyll.hs build
Generating...
hakyll.hs: Enum.toEnum{Word8}: tag (30849) is outside of bounds (0,255)

absolutize tagcloud

tag links are relative and this lead to tag/tag/tag..., well it crashes before that
fix adding toUrl at line 141 in Tags.hs

Abstract over pattern matching

Currently, all matching is done using patterns. E.g. the type of compile is

compile :: Pattern -> ... -> Rules

However, we'd like to use different types of patterns as well. Imagine we could use a typeclass:

class Pattern p where
    matches :: p -> Identifier -> Bool

This would change compile's type to:

compile :: Pattern p => p -> ... Rules

Which is cool, but if we'd have in our hakyll.hs file:

{-# LANGUAGE OverloadedStrings #-}
...
compile "foo/bar" ...

the type checker will only know that "foo/bar" instantiates IsString and Pattern, but it needs a concrete type. Adding type signatures everywhere is pretty ugly.

Instead, we're looking at another solution. We could take the pattern out of the compile/route functions and have something like

match "foo/bar" $ do
    route idRoute
    compile pageCompiler

instead of

route "foo/bar" idRoute
compile "foo/bar" pageCompiler

This would allow us to abstract over the match function (i.e. add other functions) while keeping a clean (altough backward-incompatible) rules DSL.

usage: remove dependency on manual invocation of 'ghc --make hakyll.hs'

When I added files to hakyll.hs to process, they were not acknowledged
before I again gave the command ghc --make hakyll.hs. This unexpected
behaviour cost me an hour to understand. To require two commands
to stay up-to-date is bad design, so I propose to either 1) only and always
use ghc --make to update the site; or 2) put functionality in hakyll such
that it remakes itself when hakyll.hs is changed, so ghc --make must be
called only once at the start.

empty metadata field kills Hakyll?

Compiling intermittent-fasting.page (html)
  [      ] Checking cache: modified
hakyll: "page" (line 3, column 13):
unexpected "\n"
expecting space

The problem was I had forgotten to populate description:. Hakyll should either accept it and emit a warning, or if it errors out, should use a more descriptive error specifying that a metadata field went wrong.

Allow custom ordering of links in a tag cloud

It would be cool to be able to set custom ordering of links in a tag map or at least set it to be case insensitive. Current ordering looks confusing when there are tags with capital letter.

For example I get this:

C Debian Haskell bash prolog vim

Could not compile most of examples

At current (241efb1...) revision only two hakyll.hs files from "examples" subdirs could be compiled. I have tried to quickfix others but no luck, since many functions used there already gone from current Hakyll API.

Pandoc: HTML5 generation

I have a HTML 5 blog, but the code generated by pandoc is HTML 4, meaning that I get invalid HTML 5 code. There is a switch in pandoc that enables HTML 5 generation:

-5, --html5
    Produce HTML5 instead of HTML4. This option has no effect for writers other than html.

Would it be possible to add this as a configuration option?

Post listing not updated when post title edited

Editing a posts title: field (without changing the file name) should cause any post listings (e.g. posts.html) to update on build. Right now it doesn't. I have to clean and then build to get the new title in listings.

I'm playing with hakyll-contrib's small-blog but presume this is an issue of hakyll proper.

simpleblog example urls

Since I was the one that originally suggested the jekyll like auto-blog generation, I just wanted to comment that what in the hakyll example would be ...
_site/posts/2009-12-23-almost-christmas.html

... might in Jekyll be:
_site/posts/2009/12/23/almost-christmas

If you have time at some point, could you update the example to include such an option?

enableIndexUrl option breaks site building in version 2.4

Since upgrading to Hakyll 2.4 my site will no longer build. It seems to be an issue with the enableIndexUrl option; if I disable it, the site builds fine. Here's the console output I get when running ./hakyll build.

~/projects/extralogical.net (master) $ ./hakyll build
Rendering _site/articles/2010-08-21-currying-javascript/index.html
hakyll: _cache/pages/articles/2010-08-21-currying-javascript/: openBinaryFile: inappropriate type (Is a directory)

I did try to track down where the problem was introduced, but I didn't have any luck. The problem still exists when using the current master branch, as well as the 2.4 release.

Preview options

Preview mode used to be implemented using simple time intervals. Now, the website is recompiled when the page is refreshed in the browser on localhost:8000. However, this behavior is annoying for people who open the resulting HTML files directly in their browser (via the file:// protocol).

It would be cool if there was some option to let the user choose between these two modes.

Postlist abstraction

A lot of blog sites contain some code like:

postList :: Compiler (Page String, [Page String]) (Page String)
postList = buildList "thoughts" "templates/thought.html"

buildList :: String -> Identifier -> Compiler (Page String, [Page String]) (Page String)
buildList field template = setFieldA field $
    arr (reverse . sortByBaseName)
        >>> require template (\p t -> map (applyTemplate t) p)
        >>> arr mconcat
        >>> arr pageBody

It would be nice if there was an abstraction for this in Hakyll.

Add setupIO function

setupIO should serve as a hook to some initialization in IO. It should create an item, so we can depend upon this command.

haddock <- setupIO $ do
    ... cd to some directory ...
    rawSystem "cabal" ["haddock"]
    ... create symlink ...

Use cases are, thus, symlinking, generating documentation...

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.