parent
b63146f517
commit
cabb492b34
|
@ -190,8 +190,9 @@ pageName' :: Site (FilePath -> String)
|
|||
pageName' = do
|
||||
ps <- use pages
|
||||
pure $ \mnt' ->
|
||||
just ("template looks for undefined page name : " ++ mnt')
|
||||
$ ps M.!? unAbsolute mnt' >>= (^? pageMeta . key "template" . _String . to T.unpack)
|
||||
just ("lookup for undefined page name : " ++ mnt')
|
||||
$ ps M.!? unAbsolute mnt'
|
||||
>>= (^? pageMeta . key "name" . _String . to T.unpack)
|
||||
|
||||
-- | Like `Mu.substitute` but writes (and eventually should throw) stuff on errors
|
||||
checkedSubstitute :: Mu.Template -> MT.Value -> IO T.Text
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
<header>
|
||||
Navigation:
|
||||
<ul>
|
||||
<li><a href="{{#pageLink}}/{{/pageLink}}">{{#pageName}}/{{/pageName}}</a></li>
|
||||
<li><a href="{{#pageLink}}/tag{{/pageLink}}">Tags</a></li>
|
||||
<li><a href="{{#pageLink}}/list{{/pageLink}}">List</a></li>
|
||||
<li><a href="{{#pageLink}}/search{{/pageLink}}">Search</a></li>
|
||||
<li><a href="{{#pageLink}}/search{{/pageLink}}">{{#pageName}}/search{{/pageName}}</a></li>
|
||||
</ul>
|
||||
|
||||
{{?htags}}
|
||||
|
|
Loading…
Reference in a new issue