)
where
+import Rakka.Page
import Rakka.Wiki
import Rakka.Wiki.Interpreter
import Rakka.Wiki.Interpreter.Base.Image
, divInterp
, imageInterp
, imgFrameInterp
+
+ , pageNameInterp
]
, bciInterpret
= \ _ (BlockCommand _ attrs contents) -> return $ Div attrs contents
}
+
+
+pageNameInterp :: Interpreter
+pageNameInterp = InlineCommandInterpreter {
+ iciName = "pageName"
+ , iciInterpret
+ = \ ctx (InlineCommand _ _ _) -> case ctxPage ctx of
+ Nothing -> return $ Text "(None)"
+ Just page -> return $ Text $ pageName page
+ }
\ No newline at end of file