diff --git a/servant-examples/getting-started/GS10.hs b/servant-examples/getting-started/GS10.hs index 3456df2f..fb8e4bf3 100644 --- a/servant-examples/getting-started/GS10.hs +++ b/servant-examples/getting-started/GS10.hs @@ -13,9 +13,6 @@ import Network.HTTP.Types import Network.Wai import Servant import Servant.Docs -import Servant.Docs.Pandoc (pandoc) -import Text.Pandoc.Options (def, WriterOptions(..)) -import Text.Pandoc.Writers.HTML (writeHtmlString) import qualified GS3 type DocsAPI = GS3.API :<|> Raw @@ -57,38 +54,18 @@ api = Proxy docsBS :: ByteString docsBS = encodeUtf8 . pack - . writeHtmlString opts - . pandoc + . markdown $ docsWithIntros [intro] GS3.api - where opts = def { writerHtml5 = True - , writerTableOfContents = True - , writerHighlight = True - , writerStandalone = True - , writerTemplate = - concat - [ "" - , "" - , "" - , "API Docs - $title$" - , "" - , "" - , "$toc$" - , "
" - , "$body$" - , "" - , "" - ] - } - intro = DocIntro "Welcome" ["This is our super webservice's API.", "Enjoy!"] + where intro = DocIntro "Welcome" ["This is our super webservice's API.", "Enjoy!"] server :: Server DocsAPI server = GS3.server :<|> serveDocs where serveDocs _ respond = - respond $ responseLBS ok200 [html] docsBS + respond $ responseLBS ok200 [plain] docsBS - html = ("Content-Type", "text/html") + plain = ("Content-Type", "text/plain") app :: Application app = serve api server diff --git a/servant-examples/servant-examples.cabal b/servant-examples/servant-examples.cabal index 7bc9e77a..a5faa08b 100644 --- a/servant-examples/servant-examples.cabal +++ b/servant-examples/servant-examples.cabal @@ -25,13 +25,11 @@ executable getting-started , http-types , js-jquery , lucid - , pandoc , probable , servant , servant-docs , servant-jquery , servant-lucid - , servant-pandoc >= 0.2 , servant-server , text , time