Created
December 11, 2011 19:08
-
-
Save OlegIlyenko/1462166 to your computer and use it in GitHub Desktop.
Publishing Pamflet with SBT and gh-pages (build.sbt)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.jsuereth.sbtsite.SiteKeys | |
// add all setting from the site plugin to the project | |
seq(site.settings: _*) | |
// add all setting from the ghpages plugin to the project | |
seq(ghpages.settings: _*) | |
// read-only git repository URI of the current project | |
git.remoteRepo := "git://github.com/OlegIlyenko/scaldi.git" | |
// I have chosen to publish my Scaladocs under the /api/... path | |
// instead of /api/latest/... | |
// so this line adds new target location for the generated Scaladocs | |
site.addMappingsToSiteDir(mappings in packageDoc in Compile, "api") | |
// The most interesting part. I'm adding pamflet output | |
// folder to the site mappings. Now ghpages plugin knows | |
// that files generated by pamflet plugin should also be | |
// published. Note, that PamfletKeys.write is actually | |
// hack in order to generate pamflet before site | |
// would be published. | |
SiteKeys.siteMappings <<= | |
(SiteKeys.siteMappings, PamfletKeys.write, PamfletKeys.output) map { (mappings, _, dir) => | |
mappings ++ (dir ** "*.*" x relativeTo(dir)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment