sort publications by date
This commit is contained in:
+7
-2
@@ -1,7 +1,12 @@
|
|||||||
.git
|
.git
|
||||||
.stack-work
|
.stack-work
|
||||||
|
dist-newstyle
|
||||||
_cache
|
_cache
|
||||||
_site
|
_site
|
||||||
files/
|
|
||||||
posts/
|
|
||||||
stack.yaml.lock
|
stack.yaml.lock
|
||||||
|
film/
|
||||||
|
fonts/
|
||||||
|
images/
|
||||||
|
posts/
|
||||||
|
publications/
|
||||||
|
files/
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ main = hakyllWith config $ do
|
|||||||
route idRoute
|
route idRoute
|
||||||
compile $ do
|
compile $ do
|
||||||
posts <- loadAll "posts/*"
|
posts <- loadAll "posts/*"
|
||||||
pubs <- loadAll "publications/*"
|
pubs <- recentFirst =<< loadAll "publications/*"
|
||||||
|
|
||||||
let indexCtx = listField "publications" postCtx (return pubs) <> listField "posts" postCtx (return posts) `mappend` defaultContext
|
let indexCtx = listField "publications" postCtx (return pubs) <> listField "posts" postCtx (return posts) `mappend` defaultContext
|
||||||
|
|
||||||
|
|||||||
+2
-3
@@ -17,9 +17,7 @@
|
|||||||
#
|
#
|
||||||
# resolver: ./custom-snapshot.yaml
|
# resolver: ./custom-snapshot.yaml
|
||||||
# resolver: https://example.com/snapshots/2018-01-01.yaml
|
# resolver: https://example.com/snapshots/2018-01-01.yaml
|
||||||
resolver:
|
resolver: lts-19.33
|
||||||
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/19/25.yaml
|
|
||||||
|
|
||||||
# User packages to be built.
|
# User packages to be built.
|
||||||
# Various formats can be used as shown in the example below.
|
# Various formats can be used as shown in the example below.
|
||||||
#
|
#
|
||||||
@@ -36,6 +34,7 @@ packages:
|
|||||||
# These entries can reference officially published versions as well as
|
# These entries can reference officially published versions as well as
|
||||||
# forks / in-progress versions pinned to a git hash. For example:
|
# forks / in-progress versions pinned to a git hash. For example:
|
||||||
#
|
#
|
||||||
|
|
||||||
extra-deps:
|
extra-deps:
|
||||||
- hakyll-sass-0.2.4
|
- hakyll-sass-0.2.4
|
||||||
# - acme-missiles-0.3
|
# - acme-missiles-0.3
|
||||||
|
|||||||
Reference in New Issue
Block a user