Skip to content

Instantly share code, notes, and snippets.

@kryptt
Created September 16, 2015 13:24
Show Gist options
  • Save kryptt/4e97fb982610b243a5b4 to your computer and use it in GitHub Desktop.
Save kryptt/4e97fb982610b243a5b4 to your computer and use it in GitHub Desktop.
How to get to the siteMappings in root ?
import com.typesafe.sbt.SbtSite.SiteKeys._
import com.typesafe.sbt.SbtGhPages.GhPagesKeys._
val commonSettings = Seq(
organization := "com.rodolfohansen",
version := "0.1-SNAPSHOT",
scalaVersion := "2.11.7",
autoAPIMappings := true
)
def addMapping(nestedDir: String)(m: Seq[(File, String)]) =
for((f, d) <- m) yield (f, s"$nestedDir/$d")
val presSettings = tutSettings ++ Seq(
watchSources <++= tutSourceDirectory map { path => (path ** "*.html").get },
ghpagesNoJekyll := false,
includeFilter in makeSite := "*.html" | "*.css" | "*.png" | "*.jpg" | "*.gif" | "*.js" | "*.swf" | "*.yml" | "*.md"
)
val adts = (project in file("algebraic-data-types")).
settings(commonSettings: _*).
settings(presSettings: _*).
settings(
name := "algebraic-data-types",
(siteMappings in ThisBuild) <++= tut map addMapping("adts")
)
val root = (project in file(".")).
settings(commonSettings: _*).
settings(ghpages.settings: _*).
settings(
name := "presentations",
git.remoteRepo := "git@github.com:kryptt/presentations.git"
).
aggregate (adts)
@kryptt
Copy link
Author

kryptt commented Sep 16, 2015

How do I get to the siteMappings inside the root project (as opposed to siteMappings in ThisBuild)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment