 | gitit-0.6.5: Wiki using happstack, git or darcs, and pandoc. | Contents | Index |
|
| Network.Gitit.ContentTransformer |
|
|
|
|
|
| Synopsis |
|
|
|
|
| ContentTransformer runners
|
|
| runPageTransformer :: ToMessage a => ContentTransformer a -> GititServerPart a |
| Converts a ContentTransformer into a GititServerPart;
specialized to wiki pages.
|
|
| runFileTransformer :: ToMessage a => ContentTransformer a -> GititServerPart a |
| Converts a ContentTransformer into a GititServerPart;
specialized to non-pages.
|
|
| Gitit responders
|
|
| showRawPage :: Handler |
| Responds with raw page source.
|
|
| showFileAsText :: Handler |
| Responds with raw source (for non-pages such as source
code files).
|
|
| showPage :: Handler |
| Responds with rendered wiki page.
|
|
| exportPage :: Handler |
| Responds with page exported into selected format.
|
|
| showHighlightedSource :: Handler |
| Responds with highlighted source code.
|
|
| showFile :: Handler |
| Responds with non-highlighted source code.
|
|
| preview :: Handler |
| Responds with rendered page derived from form data.
|
|
| applyPreCommitPlugins :: String -> GititServerPart String |
| Applies pre-commit plugins to raw page source, possibly
modifying it.
|
|
| Cache support for transformers
|
|
| cacheHtml :: Response -> ContentTransformer Response |
| Caches a response (actually just the response body) on disk,
unless the context indicates that the page is not cacheable.
|
|
| cachedHtml :: ContentTransformer Response |
| Returns cached page if available, otherwise mzero.
|
|
| Content retrieval combinators
|
|
| rawContents :: ContentTransformer (Maybe String) |
| Returns raw file contents.
|
|
| Response-generating combinators
|
|
| textResponse :: Maybe String -> ContentTransformer Response |
| Converts raw contents to a text/plain response.
|
|
| mimeFileResponse :: Maybe String -> ContentTransformer Response |
| Converts raw contents to a response that is appropriate with
a mime type derived from the page's extension.
|
|
| mimeResponse |
|
|
| exportPandoc :: Pandoc -> ContentTransformer Response |
| Converts Pandoc to response using format specified in parameters.
|
|
| applyWikiTemplate :: Html -> ContentTransformer Response |
| Adds the sidebar, page tabs, and other elements of the wiki page
layout to the raw content.
|
|
| Content-type transformation combinators
|
|
| pageToWikiPandoc :: Page -> ContentTransformer Pandoc |
| Converts Page to Pandoc, applies page transforms, and adds page
title.
|
|
| pageToPandoc :: Page -> ContentTransformer Pandoc |
| Converts source text to Pandoc using default page type.
|
|
| pandocToHtml :: Pandoc -> ContentTransformer Html |
| Converts pandoc document to HTML.
|
|
| highlightSource :: Maybe String -> ContentTransformer Html |
| Returns highlighted source code.
|
|
| Content or context augmentation combinators
|
|
| applyPageTransforms :: Pandoc -> ContentTransformer Pandoc |
| Applies all the page transform plugins to a Pandoc document.
|
|
| wikiDivify :: Html -> ContentTransformer Html |
| Puts rendered page content into a wikipage div, adding
categories.
|
|
| addPageTitleToPandoc :: String -> Pandoc -> ContentTransformer Pandoc |
| Adds page title to a Pandoc document.
|
|
| addMathSupport :: a -> ContentTransformer a |
| Adds javascript links for math support.
|
|
| addScripts :: PageLayout -> [String] -> PageLayout |
| Adds javascripts to page layout.
|
|
| ContentTransformer context API
|
|
| getFileName :: ContentTransformer FilePath |
|
| getPageName :: ContentTransformer String |
|
| getLayout :: ContentTransformer PageLayout |
|
| getParams :: ContentTransformer Params |
|
| getCacheable :: ContentTransformer Bool |
|
| Pandoc and wiki content conversion support
|
|
| inlinesToURL :: [Inline] -> String |
| Derives a URL from a list of Pandoc Inline elements.
|
|
| inlinesToString :: [Inline] -> String |
| Convert a list of inlines into a string.
|
|
| Produced by Haddock version 2.3.0 |