@@ -86,6 +86,35 @@ match pattern = RulesM . local addPredicate . unRulesM
8686
8787-- | Greate a group of compilers
8888--
89+-- Imagine you have a page that you want to render, but you also want the raw
90+-- content available on your site.
91+--
92+-- > match "test.markdown" $ do
93+-- > route $ setExtension "html"
94+-- > compile pageCompiler
95+-- >
96+-- > match "test.markdown" $ do
97+-- > route idRoute
98+-- > compile copyPageCompiler
99+--
100+-- Will of course conflict! In this case, Hakyll will pick the first matching
101+-- compiler (@pageCompiler@ in this case).
102+--
103+-- In case you want to have them both, you can use the 'group' function to
104+-- create a new group. For example,
105+--
106+-- > match "test.markdown" $ do
107+-- > route $ setExtension "html"
108+-- > compile pageCompiler
109+-- >
110+-- > group "raw" $ do
111+-- > match "test.markdown" $ do
112+-- > route idRoute
113+-- > compile copyPageCompiler
114+--
115+-- This will put the compiler for the raw content in a separate group
116+-- (@\"raw\"@), which causes it to be compiled as well.
117+--
89118group :: String -> Rules -> Rules
90119group g = RulesM . local setGroup' . unRulesM
91120 where