on 6433dc6 help sign in
hakyll/web/tutorials/guide.markdown
99 lines 3.5 kB history raw
1---
2title: A Guide to the Hakyll Module Zoo
3author: Brent Yorgey
4---
6The hakyll package [contains a bewildering array](/reference/) of modules, and
7it's hard to know where to look when you are just getting started -- especially
8since many of them are mostly just used by Hakyll internally and not that useful
9to website authors. This guide provides a quick reference to the contents of the
10most important and useful modules.
12## Core modules
14These are the modules containing the fundamental tools and concepts
15you need to get started building a site with hakyll.
17* [Hakyll.Core.Compiler](/reference/Hakyll-Core-Compiler.html)
19 This is one of the modules you should look at first. It defines the
20 fundamental `Compiler` type and primitive `Compiler`s as well as several
21 variants on `load`, which allow you to bring together multiple resources to
22 create a single output.
24* [Hakyll.Core.Routes](/reference/Hakyll-Core-Routes.html)
26 Specify where compiled items should go in the output site.
28* [Hakyll.Core.Rules](/reference/Hakyll-Core-Rules.html)
30 Specify which compilers and routes should be used on which resources. Also
31 has combinators for versions (necessary if you want to use the same
32 resources for multiple purposes).
34* [Hakyll.Core.Identifier.Pattern](/reference/Hakyll-Core-Identifier-Pattern.html)
36 Combinators for creating *patterns*, i.e. predicates that pick out a set of
37 resources: filesystem globs, explicit lists, regular expressions, and so on.
39* [Hakyll.Web.Page](/reference/Hakyll-Web-Pandoc.html)
41 Provides functions for rendering your pages using pandoc, with a varying
42 degree of high-levelness.
44* [Hakyll.Web.Template](/reference/Hakyll-Web-Template.html)
46 Templates specify how to take the content of an item and turn it into HTML
47 output.
49* [Hakyll.Web.Template.Context](/reference/Hakyll-Web-Template-Context.html)
51 You can't do much with a `Template` if you don't have a `Context`: this
52 module provides some predefined `Context`s and the tools to build your own.
54* [Hakyll.Main](/reference/Hakyll-Main.html)
56 The main `hakyll` function that runs the whole show. There is also a
57 `hakyllWith` function which allows for a custom configuration.
59## Pre-packaged solutions
61These modules contain some "pre-packaged" solutions for common situations. They
62can be used as-is, or their source can be used as inspiration for your own
63tools.
65* [Hakyll.Web.Page.List](/reference/Hakyll-Web-Page-List.html)
67 Combine several pages into a list, such as a list of posts, images in a
68 gallery, etc.
70* [Hakyll.Web.Feed](/reference/Hakyll-Web-Feed.html)
72 Create RSS feeds.
74* [Hakyll.Web.Tags](/reference/Hakyll-Web-Tags.html)
76 Work with tags and categories.
78## Useful utilities
80* [Hakyll.Core.UnixFilter](/reference/Hakyll-Core-UnixFilter.html)
82 Use any unix utility as a compiler.
84* [Hakyll.Core.Util.File](/reference/Hakyll-Core-Util-File.html)
86 Utility functions for working with the file system.
88* [Hakyll.Core.Util.String](/reference/Hakyll-Core-Util-String.html)
90 A few utility functions for working with `String`s (trim spaces, find and
91 replace, split on regexp).
93## Advanced customization
95* [Hakyll.Core.Writable](/reference/Hakyll-Core-Writable.html)
97 The `Writable` class is for resources which can be written to disk as part
98 of the output site. You can specify how to write your own custom types to
99 disk by giving them a `Writable` instance.