diff --git a/site.hs b/site.hs index 985ce23..1a17d58 100644 --- a/site.hs +++ b/site.hs @@ -233,6 +233,8 @@ sourceTags = do use pages htags .= M.fromList (invTags sgat) +-- | Organize a list of pages with hierarchical tags to a list with +-- hierarchical tags with pages attached. invTags :: [(FilePath, [[String]])] -> [([String], [FilePath])] invTags x = map (fmap nub) $ groupSort [(t, p) | (p, htl) <- x, ht <- htl, t <- inits ht]