File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,19 @@ main = hakyll $ do
120
120
>>= loadAndApplyTemplate " templates/boilerplate.html" sponsors
121
121
>>= relativizeUrls
122
122
123
+ -- resources -------------------------------------------------------------------------------------------
124
+ match " resources/*.markdown" $ compile pandocCompiler
125
+ create [" resources/index.html" ] $ do
126
+ route idRoute
127
+ compile $ do
128
+ sponsors <- sponsorsCtx . sortOn itemIdentifier <$> loadAll " donations/sponsors/*.markdown"
129
+ ctx <- resourcesCtx . sortOn itemIdentifier <$> loadAll " resources/*.markdown"
130
+
131
+ makeItem " "
132
+ >>= loadAndApplyTemplate " templates/resources/list.html" ctx
133
+ >>= loadAndApplyTemplate " templates/boilerplate.html" sponsors
134
+ >>= relativizeUrls
135
+
123
136
-- templates -------------------------------------------------------------------------------------------
124
137
match " templates/*" $ compile templateBodyCompiler
125
138
match " templates/**" $ compile templateBodyCompiler
@@ -190,6 +203,12 @@ faqCtx entries =
190
203
listField " faq_entries" defaultContext (sortFromMetadataField " order" entries) <>
191
204
defaultContext
192
205
206
+ -- resources -------------------------------------------------------------------------------------------
207
+ resourcesCtx :: [Item String ] -> Context String
208
+ resourcesCtx resources =
209
+ listField " resources" defaultContext (return resources) <>
210
+ defaultContext
211
+
193
212
--------------------------------------------------------------------------------------------------------
194
213
-- UTILS -----------------------------------------------------------------------------------------------
195
214
--------------------------------------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments