yesod-gitrev: A subsite for displaying git information.

[ bsd3, library, unclassified ] [ Propose Tags ]

[Skip to Readme]
Versions 0.1.0.0, 0.2.0.0
Change log ChangeLog.md
Dependencies aeson, base (==4.*), gitrev, template-haskell, yesod-core (>=1.6) [details]
License BSD-3-Clause
Copyright 2015 FP Complete Corporation
Author Dan Burton
Maintainer danburton.email@gmail.com
Revised Revision 1 made by DanBurton at Sat Mar 17 21:30:56 UTC 2018
Home page https://github.com/DanBurton/yesod-gitrev
Bug tracker https://github.com/DanBurton/yesod-gitrev/issues
Source repo head: git clone git://github.com/DanBurton/yesod-gitrev.git
Uploaded by DanBurton at Sat Mar 17 21:25:46 UTC 2018
Distributions LTSHaskell:0.2.0.0, NixOS:0.2.0.0, Stackage:0.2.0.0, openSUSE:0.2.0.0
Downloads 467 total (15 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2018-03-18 [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

For package maintainers and hackage trustees


Readme for yesod-gitrev-0.2.0.0

[back to package description]

A subsite for displaying git information.

You can use the gitRev splice (or tGitRev typed splice) to generate a value of type GitRev. Put this in your app's foundation, add a route to the subsite, and you're good to go.

See [Haskell and Yesod > Creating a Subsite] (http://www.yesodweb.com/book/creating-a-subsite) for details on how Yesod subsites work.

-- examples/Main.hs

{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes       #-}
{-# LANGUAGE TemplateHaskell   #-}
{-# LANGUAGE TypeFamilies      #-}

import Yesod
import Yesod.GitRev

data Master = Master
  { getGitRev :: GitRev
  }

mkYesod "Master" [parseRoutes|
/build-version GitRevR GitRev getGitRev
|]

instance Yesod Master

main = warp 3000 $ Master $$(tGitRev)