Commit 1b213744 authored by Nicolas Lenz's avatar Nicolas Lenz

Fix active on articles

parent 2c45cd93
Pipeline #290 passed with stage
in 3 minutes and 6 seconds
......@@ -17,7 +17,8 @@ putNavbar nebelhorn@Nebelhorn{..} = nebelhorn
, nebelhornPages = putNavbarPage <$> nebelhornPages
, nebelhornIndex = putNavbarPage nebelhornIndex
} where
putNavbarArticle = addMeta "navbar" $ MetaList $ navItemToMeta True <$> nebelhornNavItems
putNavbarArticle = addMeta "navbar" $ MetaList $ f <$> nebelhornNavItems where
f n@NavItem{..} = navItemToMeta navItemActiveOnArticles n
putNavbarPage pandoc@(Pandoc meta _) = addMeta "navbar" (MetaList $ f <$> nebelhornNavItems) pandoc where
f n@NavItem{..} = case lookupMeta "link" meta of
Just (MetaString link) -> navItemToMeta (unpack navItemLink == "/" <> link) n
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment