1module Servant.Utils.StaticFiles (
7import Data.String.Conversions
8import Filesystem.Path.CurrentOS (decodeString)
9import Network.HTTP.Types
11import Network.Wai.Application.Static
17serveDirectory :: FilePath -> Server Raw
18serveDirectory documentRoot =
19 staticApp (defaultFileServerSettings (decodeString (documentRoot ++ "/")))
21serveDocumentation :: HasDocs api => Proxy api -> Server Raw
22serveDocumentation proxy _request respond =
23 respond $ responseLBS ok200 [] $ cs $ toHtml $ markdown $ docs proxy
25toHtml :: String -> String
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list