diff options
| author | Mirek Kratochvil <exa.exa@gmail.com> | 2023-07-16 19:45:33 +0200 |
|---|---|---|
| committer | Mirek Kratochvil <exa.exa@gmail.com> | 2023-07-16 19:45:33 +0200 |
| commit | 0e717b5dda55602aa3ef34991f9c7dd8762c678b (patch) | |
| tree | b6eb8b058cb8a7eb299fc25026bae8440c61e808 /site.hs | |
| parent | 4a32e69bff4f5b3ffd69794732f220ce87821a77 (diff) | |
| download | reploy-0e717b5dda55602aa3ef34991f9c7dd8762c678b.tar.gz reploy-0e717b5dda55602aa3ef34991f9c7dd8762c678b.tar.bz2 | |
use human tag names for search indexes
Diffstat (limited to 'site.hs')
| -rw-r--r-- | site.hs | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -507,15 +507,15 @@ mkSearchData mount pi = do -- TODO: unify retrieval of tags let tags = sort $ pi ^.. pageMeta . key "tags" . values . _String . to T.unpack + tagnames <- traverse (traverse getTagName . splitDirectories) tags + let tagarray = Y.array . map (Y.array . map fromString) $ tagnames if pi ^? pageMeta . key "search" . _Bool == Just False -- `off` gets parsed as bool then pure [] else pure $ [ Y.object [ ("link", fromString link) , ("title", maybe (fromString mount) Y.String title) - , ( "tags" - , Y.array $ - map (Y.array . map fromString . splitDirectories) tags) + , ("tags", tagarray) , ("text", Y.String text) ] ] |
