mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-12-01 07:45:22 +03:00
Sort articles by publish date.
This commit is contained in:
parent
a55440f44e
commit
fa7ac18fc1
@ -39,6 +39,12 @@ view posts =
|
||||
Metadata.BlogIndex ->
|
||||
Nothing
|
||||
)
|
||||
|> List.sortBy
|
||||
(\( path, metadata ) ->
|
||||
metadata.published
|
||||
|> Date.toRataDie
|
||||
)
|
||||
|> List.reverse
|
||||
|> List.map postSummary
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user