aboutsummaryrefslogtreecommitdiff
path: root/reploy.hs
diff options
context:
space:
mode:
authorMirek Kratochvil <exa.exa@gmail.com>2023-10-15 23:06:59 +0200
committerMirek Kratochvil <miroslav.kratochvil@uni.lu>2023-10-16 11:34:26 +0200
commit1f2ab58478925481d5cf273d38e30fc06e96e69e (patch)
tree9f65d867623fe1dfa48b856c0740bc1e2334c509 /reploy.hs
parent53aa481aace0a59579846fddba8de41a465654ea (diff)
downloadreploy-1f2ab58478925481d5cf273d38e30fc06e96e69e.tar.gz
reploy-1f2ab58478925481d5cf273d38e30fc06e96e69e.tar.bz2
stabilize and parametrize sorting of stuff, get rid of "title"
Diffstat (limited to 'reploy.hs')
-rw-r--r--reploy.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/reploy.hs b/reploy.hs
index 12d7a57..8f1cd73 100644
--- a/reploy.hs
+++ b/reploy.hs
@@ -439,8 +439,8 @@ makeSearchData :: FilePath -> PageInfo -> Site [Y.Value]
makeSearchData mount pi = do
link <- rootedPageLink mount
text <- io . runIOorExplode $ writePlain plainWriteOpts (pi ^. pageDoc)
- let title = pi ^? pageMeta . key "title" . _String
- -- TODO: unify retrieval of tags
+ let name = pi ^? pageMeta . key "name" . _String
+ -- TODO: unify retrieval of tags?
let tags =
sort $ pi ^.. pageMeta . key "tags" . values . _String . to T.unpack
tagnames <- traverse (traverse getTagGroupName . inits . splitTag) tags
@@ -450,7 +450,7 @@ makeSearchData mount pi = do
else pure $
[ Y.object
[ ("link", fromString link)
- , ("title", maybe (fromString mount) Y.String title)
+ , ("name", maybe (fromString mount) Y.String name)
, ("tags", tagarray)
, ("text", Y.String text)
]