| Copyright | (c) 2021-2022 Mirko Westermeier |
|---|---|
| License | MIT |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
HTMell.Util
Contents
Description
Useful utility functions.
Synopsis
- pathParts :: String -> [String]
- splitNodePath :: String -> (Integer, String)
- data PseudoContent = PseudoContent
- cempty :: Maybe PseudoContent
- compose :: [a -> a] -> a -> a
Content trees
pathParts :: String -> [String] #
Splits a given content address string in its single path parts.
pathParts "/foo/bar/baz" == ["foo", "bar", "baz"]
splitNodePath :: String -> (Integer, String) #
Content
data PseudoContent #
Trivial pseudo content, useful for testing only.
Constructors
| PseudoContent |
Instances
| Eq PseudoContent # | |
Defined in HTMell.Util Methods (==) :: PseudoContent -> PseudoContent -> Bool # (/=) :: PseudoContent -> PseudoContent -> Bool # | |
| Show PseudoContent # | |
Defined in HTMell.Util Methods showsPrec :: Int -> PseudoContent -> ShowS # show :: PseudoContent -> String # showList :: [PseudoContent] -> ShowS # | |
| HTMellContent PseudoContent # | |
Defined in HTMell.Util Methods getContent :: FilePath -> IO (Maybe PseudoContent) # metadata :: PseudoContent -> Map String String # toHTML :: PseudoContent -> Text # | |
cempty :: Maybe PseudoContent #
An empty PseudoContent value, useful for testing only.