The servant-pandoc package

[Tags:library, mit]

Use pandoc to generate documentation for your Servant API.

[Skip to Readme]


Versions 0.1,,, 0.4.0, 0.4.1,,,,
Change log CHANGELOG
Dependencies base (>=4.7 && <5), bytestring (==0.10.*), case-insensitive (>=0.2 && <1.3), http-media (>=0.6 && <0.8), lens (>=4.9 && <5), pandoc-types (>=1.12 && <1.18), servant-docs (==0.11.*), string-conversions (>=0.1 && <0.5), text (==1.2.*), unordered-containers (==0.2.*) [details]
License MIT
Author Matthew Pickering, Ivan Miljenovic
Category Web
Source repository head: git clone
Uploaded Tue Jul 25 06:18:37 UTC 2017 by IvanMiljenovic
Distributions NixOS:, Stackage:
Downloads 1117 total (120 in the last 30 days)
1 []
Status Docs available [build log]
Last success reported on 2017-07-25 [all 1 reports]
Hackage Matrix CI




Maintainer's Corner

For package maintainers and hackage trustees

Readme for servant-pandoc

Readme for servant-pandoc-

There are two ways in which to use this module.

The first is to use the renderer directly with the pandoc API. A very simple program to render the API documentation as a mediawiki document might look as follows.

 import Text.Pandoc import Servant.Docs.Pandoc import Servant.Docs
 import Data.Default (def)

 myApi :: Proxy MyAPI myApi = Proxy

 writeDocs :: API -\> IO () writeDocs api = writeFile ""
 (writeMediaWiki def (pandoc api))

The second approach is to use makeFilter to make a filter which can be used directly with pandoc from the command line. This filter will just append the API documentation to the end of the document. Example usage

-- api.hs
main :: IO ()
main = makeFilter (docs myApi)

> pandoc -o api.pdf --filter=api.hs