Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JP - Creates docs module #19

Merged
merged 2 commits into from
Sep 13, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
---
layout: home
technologies:
- scala: ["Scala", "sbt-microsites plugin is written in Scala"]
- sbt: ["SBT", "sbt-microsites plugin uses SBT and other sbt plugins to generate microsites easily"]
- jekyll: ["Jekyll", "Jekyll allows to transform plain text into static websites and blogs."]
---

# sbt-microsites

## Prerequisites
Expand Down
42 changes: 40 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ lazy val artifactSettings = Seq(
)
)

lazy val commonSettings = Seq(
lazy val pluginSettings = Seq(
sbtPlugin := true,
scalaVersion in ThisBuild := "2.10.6",
resolvers ++= Seq(
Expand All @@ -23,7 +23,39 @@ lazy val commonSettings = Seq(
scalafmtConfig in ThisBuild := Some(file(".scalafmt"))
) ++ reformatOnCompileSettings

lazy val allSettings = commonSettings ++ artifactSettings ++ tutSettings
lazy val micrositeSettings = Seq(
micrositeName := "sbt-microsites",
micrositeDescription := "An easy way to create your project's microsite",
micrositeHighlightTheme := "atom-one-light",
micrositeBaseUrl := "sbt-microsites",
micrositeGithubOwner := "47deg",
micrositeGithubRepo := "sbt-microsites",
micrositeExtratMdFiles := Map(file("README.md") -> "index.md"),
micrositePalette := Map("brand-primary" -> "#FC4053",
"brand-secondary" -> "#B92239",
"brand-tertiary" -> "#8C192F",
"gray-dark" -> "#464646",
"gray" -> "#7E7E7E",
"gray-light" -> "#E8E8E8",
"gray-lighter" -> "#F6F6F6",
"white-color" -> "#FFFFFF"),
includeFilter in makeSite := "*.html" | "*.css" | "*.png" | "*.jpg" | "*.gif" | "*.js" | "*.swf" | "*.md"
)

lazy val miscSettings = Seq(
shellPrompt := { s: State =>
val c = scala.Console
val blue = c.RESET + c.BLUE + c.BOLD
val white = c.RESET + c.BOLD

val projectName = Project.extract(s).currentProject.id

s"$blue$projectName$white>${c.RESET}"
}
)

lazy val commonSettings = artifactSettings ++ miscSettings
lazy val allSettings = pluginSettings ++ commonSettings ++ tutSettings

lazy val `sbt-microsites` = (project in file("."))
.settings(moduleName := "sbt-microsites")
Expand All @@ -33,3 +65,9 @@ lazy val `sbt-microsites` = (project in file("."))
.settings(addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.0.0"))
.settings(addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.5.4"))
.enablePlugins(JavaServerAppPackaging, UniversalPlugin, JekyllPlugin, AutomateHeaderPlugin)

lazy val docs = (project in file("docs"))
.settings(commonSettings: _*)
.settings(micrositeSettings: _*)
.settings(moduleName := "docs")
.enablePlugins(MicrositesPlugin)
1 change: 1 addition & 0 deletions docs/src/main/resources/css/override.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Intentionally empty
2 changes: 2 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "0.3.1")
addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.8.2")
resolvers += "jgit-repo" at "http://download.eclipse.org/jgit/maven"
addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.5.4")
// Plugin inception dependency to be able to generate the sbt-microsites' microsite
addSbtPlugin("com.fortysevendeg" % "sbt-microsites" % "0.2.0-SNAPSHOT")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is possible?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep!