diff --git a/.github/actions.yml b/.github/actions.yml new file mode 100644 index 00000000..ef28178c --- /dev/null +++ b/.github/actions.yml @@ -0,0 +1,3 @@ +pre: + ci: 'gem install jekyll -v 4' + docs: 'gem install jekyll -v 4' \ No newline at end of file diff --git a/AUTHORS.md b/AUTHORS.md index 73db53ac..2ca3b1f9 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -8,6 +8,11 @@ The maintainers of the project are: +- [![47erbot](https://avatars1.githubusercontent.com/u/24799081?v=4&s=20) **47erbot**](https://github.com/47erbot) +- [![AdrianRaFo](https://avatars0.githubusercontent.com/u/15971742?v=4&s=20) **Adrian Ramirez Fornell (AdrianRaFo)**](https://github.com/AdrianRaFo) +- [![alejandrohdezma](https://avatars0.githubusercontent.com/u/9027541?v=4&s=20) **Alejandro Hernández (alejandrohdezma)**](https://github.com/alejandrohdezma) +- [![anamariamv](https://avatars0.githubusercontent.com/u/2183589?v=4&s=20) **Ana Mª Marquez (anamariamv)**](https://github.com/anamariamv) +- [![AntonioMateoGomez](https://avatars0.githubusercontent.com/u/25897490?v=4&s=20) **Antonio Mateo (AntonioMateoGomez)**](https://github.com/AntonioMateoGomez) - [![BenFradet](https://avatars2.githubusercontent.com/u/1737211?v=4&s=20) **Ben Fradet (BenFradet)**](https://github.com/BenFradet) - [![cb372](https://avatars1.githubusercontent.com/u/106760?v=4&s=20) **Chris Birchall (cb372)**](https://github.com/cb372) - [![diesalbla](https://avatars1.githubusercontent.com/u/1764610?v=4&s=20) **Diego E. Alonso Blas (diesalbla)**](https://github.com/diesalbla) @@ -15,9 +20,13 @@ The maintainers of the project are: - [![fedefernandez](https://avatars0.githubusercontent.com/u/720923?v=4&s=20) **Fede Fernández (fedefernandez)**](https://github.com/fedefernandez) - [![franciscodr](https://avatars1.githubusercontent.com/u/1200151?v=4&s=20) **Francisco Diaz (franciscodr)**](https://github.com/franciscodr) - [![israelperezglez](https://avatars1.githubusercontent.com/u/646886?v=4&s=20) **Israel Pérez (israelperezglez)**](https://github.com/israelperezglez) +- [![jkmcclellan](https://avatars3.githubusercontent.com/u/52432856?v=4&s=20) **Jason McClellan (jkmcclellan)**](https://github.com/jkmcclellan) - [![jdesiloniz](https://avatars2.githubusercontent.com/u/2835739?v=4&s=20) **Javier de Silóniz Sandino (jdesiloniz)**](https://github.com/jdesiloniz) - [![juanpedromoreno](https://avatars2.githubusercontent.com/u/4879373?v=4&s=20) **Juan Pedro Moreno (juanpedromoreno)**](https://github.com/juanpedromoreno) +- [![calvellido](https://avatars0.githubusercontent.com/u/7753447?v=4&s=20) **Juan Valencia (calvellido)**](https://github.com/calvellido) +- [![MaureenElsberry](https://avatars0.githubusercontent.com/u/17556002?v=4&s=20) **Maureen Elsberry (MaureenElsberry)**](https://github.com/MaureenElsberry) - [![noelmarkham](https://avatars1.githubusercontent.com/u/1492487?v=4&s=20) **Noel Markham (noelmarkham)**](https://github.com/noelmarkham) +- [![pepegar](https://avatars0.githubusercontent.com/u/694179?v=4&s=20) **Pepe García (pepegar)**](https://github.com/pepegar) - [![rafaparadela](https://avatars3.githubusercontent.com/u/315070?v=4&s=20) **Rafa Paradela (rafaparadela)**](https://github.com/rafaparadela) ## Contributors @@ -52,4 +61,37 @@ These are the people that have contributed to the _sbt-microsites_ project: - [![britneywright](https://avatars2.githubusercontent.com/u/4439228?v=4&s=20) **britneywright**](https://github.com/britneywright) - [![noelmarkham](https://avatars1.githubusercontent.com/u/1492487?v=4&s=20) **noelmarkham**](https://github.com/noelmarkham) - [![franciscodr](https://avatars1.githubusercontent.com/u/1200151?v=4&s=20) **franciscodr**](https://github.com/franciscodr) -- [![julien-truffaut](https://avatars1.githubusercontent.com/u/1859417?v=4&s=20) **julien-truffaut**](https://github.com/julien-truffaut) \ No newline at end of file +- [![julien-truffaut](https://avatars1.githubusercontent.com/u/1859417?v=4&s=20) **julien-truffaut**](https://github.com/julien-truffaut) +- [![ryan-williams](https://avatars1.githubusercontent.com/u/465045?v=4&s=20) **ryan-williams**](https://github.com/ryan-williams) +- [![travisbrown](https://avatars3.githubusercontent.com/u/316049?v=4&s=20) **travisbrown**](https://github.com/travisbrown) +- [![vlovgr](https://avatars1.githubusercontent.com/u/1163201?v=4&s=20) **vlovgr**](https://github.com/vlovgr) +- [![xuwei-k](https://avatars0.githubusercontent.com/u/389787?v=4&s=20) **xuwei-k**](https://github.com/xuwei-k) +- [![alejandrohdezma](https://avatars0.githubusercontent.com/u/9027541?v=4&s=20) **alejandrohdezma**](https://github.com/alejandrohdezma) +- [![anamariamv](https://avatars0.githubusercontent.com/u/2183589?v=4&s=20) **anamariamv**](https://github.com/anamariamv) +- [![Antoniojimenez47](https://avatars3.githubusercontent.com/u/24649817?v=4&s=20) **Antoniojimenez47**](https://github.com/Antoniojimenez47) +- [![ChristopherDavenport](https://avatars0.githubusercontent.com/u/10272700?v=4&s=20) **ChristopherDavenport**](https://github.com/ChristopherDavenport) +- [![erikerlandson](https://avatars0.githubusercontent.com/u/259898?v=4&s=20) **erikerlandson**](https://github.com/erikerlandson) +- [![eperinan](https://avatars3.githubusercontent.com/u/3660921?v=4&s=20) **eperinan**](https://github.com/eperinan) +- [![felixmulder](https://avatars1.githubusercontent.com/u/1530049?v=4&s=20) **felixmulder**](https://github.com/felixmulder) +- [![fthomas](https://avatars1.githubusercontent.com/u/141252?v=4&s=20) **fthomas**](https://github.com/fthomas) +- [![jatcwang](https://avatars0.githubusercontent.com/u/4957161?v=4&s=20) **jatcwang**](https://github.com/jatcwang) +- [![jpzk](https://avatars3.githubusercontent.com/u/31909?v=4&s=20) **jpzk**](https://github.com/jpzk) +- [![guersam](https://avatars3.githubusercontent.com/u/969120?v=4&s=20) **guersam**](https://github.com/guersam) +- [![jcazevedo](https://avatars2.githubusercontent.com/u/143188?v=4&s=20) **jcazevedo**](https://github.com/jcazevedo) +- [![jonas](https://avatars2.githubusercontent.com/u/8417?v=4&s=20) **jonas**](https://github.com/jonas) +- [![mcanlas](https://avatars0.githubusercontent.com/u/881934?v=4&s=20) **mcanlas**](https://github.com/mcanlas) +- [![thesamet](https://avatars0.githubusercontent.com/u/307373?v=4&s=20) **thesamet**](https://github.com/thesamet) +- [![Taig](https://avatars0.githubusercontent.com/u/567857?v=4&s=20) **Taig**](https://github.com/Taig) +- [![philwills](https://avatars2.githubusercontent.com/u/68329?v=4&s=20) **philwills**](https://github.com/philwills) +- [![pdalpra](https://avatars1.githubusercontent.com/u/1514127?v=4&s=20) **pdalpra**](https://github.com/pdalpra) +- [![metasim](https://avatars3.githubusercontent.com/u/131013?v=4&s=20) **metasim**](https://github.com/metasim) +- [![gitter-badger](https://avatars2.githubusercontent.com/u/8518239?v=4&s=20) **gitter-badger**](https://github.com/gitter-badger) +- [![NeQuissimus](https://avatars0.githubusercontent.com/u/628342?v=4&s=20) **NeQuissimus**](https://github.com/NeQuissimus) +- [![valydia](https://avatars1.githubusercontent.com/u/2129101?v=4&s=20) **valydia**](https://github.com/valydia) +- [![vaslabs](https://avatars2.githubusercontent.com/u/3875429?v=4&s=20) **vaslabs**](https://github.com/vaslabs) +- [![jvican](https://avatars0.githubusercontent.com/u/2462974?v=4&s=20) **jvican**](https://github.com/jvican) +- [![kczulko](https://avatars0.githubusercontent.com/u/19495571?v=4&s=20) **kczulko**](https://github.com/kczulko) +- [![kencyke](https://avatars2.githubusercontent.com/u/26133249?v=4&s=20) **kencyke**](https://github.com/kencyke) +- [![lldh](https://avatars0.githubusercontent.com/u/2140264?v=4&s=20) **lldh**](https://github.com/lldh) +- [![pepegar](https://avatars0.githubusercontent.com/u/694179?v=4&s=20) **pepegar**](https://github.com/pepegar) +- [![slice](https://avatars0.githubusercontent.com/u/4206232?v=4&s=20) **slice**](https://github.com/slice) \ No newline at end of file diff --git a/README.md b/README.md index cbb4e9d1..9d4f813a 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,6 @@ -[comment]: # (Start Badges) - [![Maven Central](https://img.shields.io/badge/maven%20central-1.2.1-green.svg)](https://repo1.maven.org/maven2/com/47deg/sbt-microsites_2.12_1.0) [![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://raw.githubusercontent.com/47degrees/sbt-microsites/master/LICENSE) [![Join the chat at https://gitter.im/47degrees/sbt-microsites](https://badges.gitter.im/47degrees/sbt-microsites.svg)](https://gitter.im/47degrees/sbt-microsites?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![GitHub Issues](https://img.shields.io/github/issues/47degrees/sbt-microsites.svg)](https://github.com/47degrees/sbt-microsites/issues) -[comment]: # (End Badges) - # sbt-microsites **sbt-microsites** is an SBT plugin that facilitates the creation of fancy microsites for your projects, with minimal tweaks. @@ -21,15 +17,12 @@ A microsite is an instance of Jekyll, ready to publish a static web page for you To begin, add the following lines to the `project/plugins.sbt` file within your project or sbt module where you want to use the `sbt-microsites` plugin. -[comment]: # (Start Replace) - ``` addSbtPlugin("com.47deg" % "sbt-microsites" % "1.2.1") ``` -[comment]: # (End Replace) - Finally, to enable the plugin, add this to your `build.sbt` file: + ``` enablePlugins(MicrositesPlugin) ``` @@ -71,11 +64,8 @@ Many Scala projects, libraries, and applications use sbt-microsites to display d ![Mocked Streams](https://mockedstreams.madewithtea.com/img/navbar_brand.png) | [**Mocked Streams**](https://mockedstreams.madewithtea.com) | Scala DSL for Unit-Testing Kafka Streams Topologies ![sbt-kubeyml](http://sbt-kubeyml.vaslabs.org/img/navbar_brand.png) | [**sbt-kubeyml**](http://sbt-kubeyml.vaslabs.org) | Typesafe Kubernetes manifests to deploy Scala applications -[comment]: # (Start Copyright) # Copyright sbt-microsites is designed and developed by 47 Degrees Copyright (C) 2016-2020 47 Degrees. - -[comment]: # (End Copyright) diff --git a/build.sbt b/build.sbt index 2628ca50..e55372dd 100644 --- a/build.sbt +++ b/build.sbt @@ -1,13 +1,15 @@ -inThisBuild( - List( - organization := "com.47deg", - scalaVersion := V.scala - ) -) +ThisBuild / organization := "com.47deg" +ThisBuild / scalaVersion := "2.12.11" -addCommandAlias("ci-test", "scalafmtCheckAll; scalafmtSbtCheck; docs/tut; compile; test; scripted") -addCommandAlias("ci-docs", "project-docs/mdoc; headerCreateAll") -addCommandAlias("ci-microsite", "docs/publishMicrosite") +addCommandAlias( + "ci-test", + "scalafmtCheckAll; scalafmtSbtCheck; microsite/mdoc; compile; test; scripted" +) +addCommandAlias( + "ci-docs", + "github; documentation/mdoc; headerCreateAll; microsite/publishMicrosite" +) +addCommandAlias("ci-publish", "github; ci-release") lazy val `sbt-microsites` = (project in file(".")) .settings(moduleName := "sbt-microsites") @@ -15,69 +17,36 @@ lazy val `sbt-microsites` = (project in file(".")) .enablePlugins(JekyllPlugin) .enablePlugins(SbtPlugin) -lazy val docs = project - .settings(moduleName := "docs") +lazy val microsite = project .settings(micrositeSettings: _*) .settings(skip in publish := true) - .settings( - Seq( - buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion), - buildInfoPackage := "microsites" - ): _* - ) .enablePlugins(MicrositesPlugin) - .enablePlugins(TutPlugin) - .enablePlugins(BuildInfoPlugin) + .enablePlugins(MdocPlugin) -lazy val `project-docs` = (project in file(".docs")) - .aggregate(`sbt-microsites`) - .dependsOn(`sbt-microsites`) - .settings(moduleName := "sbt-microsites-project-docs") - .settings(mdocIn := file(".docs")) +lazy val documentation = project .settings(mdocOut := file(".")) .settings(skip in publish := true) .enablePlugins(MdocPlugin) -lazy val V = new { - val ghPages: String = "0.6.3" - val github4s: String = "0.24.0" - val mdoc: String = "2.1.1" - val moultingyaml: String = "0.4.2" - val sbtSite: String = "1.4.0" - val scala: String = "2.12.11" - val scalatestScalacheck: String = "3.1.1.1" - val scalatags: String = "0.9.0" - val scrimage: String = "2.1.8" - val tut: String = "0.6.13" -} - lazy val pluginSettings: Seq[Def.Setting[_]] = Seq( - sbtPlugin := true, - resolvers ++= Seq( - Resolver.sonatypeRepo("snapshots"), - "jgit-repo" at "https://download.eclipse.org/jgit/maven" - ), - addSbtPlugin("org.tpolecat" % "tut-plugin" % V.tut), - addSbtPlugin("org.scalameta" % "sbt-mdoc" % V.mdoc), - addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % V.ghPages), - addSbtPlugin("com.typesafe.sbt" % "sbt-site" % V.sbtSite), + addSbtPlugin("org.tpolecat" % "tut-plugin" % "0.6.13"), + addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.1.1"), + addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.3"), + addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.4.0"), libraryDependencies ++= Seq( - "com.47deg" %% "github4s" % V.github4s, - "net.jcazevedo" %% "moultingyaml" % V.moultingyaml, - "com.lihaoyi" %% "scalatags" % V.scalatags, - "com.sksamuel.scrimage" %% "scrimage-core" % V.scrimage, - "org.scalatestplus" %% "scalacheck-1-14" % V.scalatestScalacheck % Test + "com.47deg" %% "github4s" % "0.24.0", + "net.jcazevedo" %% "moultingyaml" % "0.4.2", + "com.lihaoyi" %% "scalatags" % "0.9.0", + "com.sksamuel.scrimage" %% "scrimage-core" % "2.1.8", + "org.scalatestplus" %% "scalacheck-1-14" % "3.1.1.1" % Test ), - scriptedLaunchOpts := { - scriptedLaunchOpts.value ++ - Seq( - "-Xmx2048M", - "-XX:ReservedCodeCacheSize=256m", - "-XX:+UseConcMarkSweepGC", - "-Dplugin.version=" + version.value, - "-Dscala.version=" + scalaVersion.value - ) - } + scriptedLaunchOpts ++= Seq( + "-Xmx2048M", + "-XX:ReservedCodeCacheSize=256m", + "-XX:+UseConcMarkSweepGC", + "-Dplugin.version=" + version.value, + "-Dscala.version=" + scalaVersion.value + ) ) lazy val micrositeSettings: Seq[Def.Setting[_]] = Seq( @@ -85,8 +54,6 @@ lazy val micrositeSettings: Seq[Def.Setting[_]] = Seq( micrositeDescription := "An sbt plugin to create awesome microsites for your project", micrositeBaseUrl := "sbt-microsites", micrositeDocumentationUrl := "docs", - micrositeGithubOwner := "47degrees", - micrositeGithubRepo := "sbt-microsites", micrositeGithubToken := sys.env.get("GITHUB_TOKEN"), micrositePushSiteWith := GitHub4s, includeFilter in makeSite := "*.html" | "*.css" | "*.png" | "*.jpg" | "*.gif" | "*.js" | "*.swf" | "*.md" | "*.svg" diff --git a/.docs/AUTHORS.md b/docs/AUTHORS.md similarity index 100% rename from .docs/AUTHORS.md rename to docs/AUTHORS.md diff --git a/.docs/CODE_OF_CONDUCT.md b/docs/CODE_OF_CONDUCT.md similarity index 100% rename from .docs/CODE_OF_CONDUCT.md rename to docs/CODE_OF_CONDUCT.md diff --git a/.docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md similarity index 100% rename from .docs/CONTRIBUTING.md rename to docs/CONTRIBUTING.md diff --git a/.docs/LICENSE.md b/docs/LICENSE.md similarity index 100% rename from .docs/LICENSE.md rename to docs/LICENSE.md diff --git a/.docs/NOTICE.md b/docs/NOTICE.md similarity index 100% rename from .docs/NOTICE.md rename to docs/NOTICE.md diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 00000000..d9332f0a --- /dev/null +++ b/docs/README.md @@ -0,0 +1,71 @@ + +[![Maven Central](https://img.shields.io/badge/maven%20central-1.2.1-green.svg)](https://repo1.maven.org/maven2/com/47deg/sbt-microsites_2.12_1.0) [![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://raw.githubusercontent.com/47degrees/sbt-microsites/master/LICENSE) [![Join the chat at https://gitter.im/47degrees/sbt-microsites](https://badges.gitter.im/47degrees/sbt-microsites.svg)](https://gitter.im/47degrees/sbt-microsites?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![GitHub Issues](https://img.shields.io/github/issues/47degrees/sbt-microsites.svg)](https://github.com/47degrees/sbt-microsites/issues) + +# sbt-microsites + +**sbt-microsites** is an SBT plugin that facilitates the creation of fancy microsites for your projects, with minimal tweaks. + +## What is a microsite? + +A microsite is an instance of Jekyll, ready to publish a static web page for your new library. Some of the benefits of having these auto-generated web pages are: + +- You can write documentation easily in markdown format. +- Templates, layouts, styles, and other resources will be available through the plugin at compile time. +- You don't have to deal with the styling. + +# Installation + +To begin, add the following lines to the `project/plugins.sbt` file within your project or sbt module where you want to use the `sbt-microsites` plugin. + +``` +addSbtPlugin("com.47deg" % "sbt-microsites" % "@VERSION@") +``` + +Finally, to enable the plugin, add this to your `build.sbt` file: + +``` +enablePlugins(MicrositesPlugin) +``` + +We recommend taking a look at the `Getting Started` section in the [documentation](https://47degrees.github.io/sbt-microsites/docs/) since there are some prerequisites that are needed to build your microsite. + +# Documentation + +Microsites comes with a range of options to customize and configure your project's site. Please visit the [documentation](https://47degrees.github.io/sbt-microsites/docs/) section for more information. + +# sbt-microsites in the wild + +Many Scala projects, libraries, and applications use sbt-microsites to display documentation and project notes. If you wish to add your library here, please consider a PR to include it in the list below. + +★ | ★ | ★ +--- | --- | --- +![Cats](http://typelevel.org/cats/img/navbar_brand.png) | [**Cats**](http://typelevel.org/cats/) | A library of typeclasses for functional programming, such as functors, monads, and arrows. +![Scalaz](https://scalaz.github.io/8/img/navbar_brand.png) | [**Scalaz**](https://scalaz.github.io/7/) | A library of typeclasses for functional programming, such as functors, monads, and arrows. +![Cats-Effect](http://typelevel.org/cats/img/navbar_brand.png) | [**Cats-Effect**](https://github.com/typelevel/cats-effect) | Extension of Cats for general effect types, with asynchronicity and concurrency +![FS2](http://fs2.io/img/navbar_brand.png) | [**fs2**](http://fs2.io/guide.html) | Functional Streams for Scala (FS2), based on `cats` and `cats-effect` +![PureConfig](https://pureconfig.github.io/img/navbar_brand.png) | [**pureconfig**](https://pureconfig.github.io/) | A library for loading configuration files +![Ciris](https://cir.is/img/navbar_brand.png) | [**ciris**](https://cir.is/) | A _configuration as code_ library for compile-time safe configurations +![Tuco](https://tpolecat.github.io/tuco/img/navbar_brand.png) | [**Tuco**](https://tpolecat.github.io/tuco/) | Tuco is a reasonable telnet server for Scala +![Atto](https://tpolecat.github.io/atto/img/navbar_brand.png) | [**Atto**](https://tpolecat.github.io/atto/) | Everyday parsers. +![Typelevel Scala](http://typelevel.org/scala/img/navbar_brand.png) | [**Typelevel Scala**](http://typelevel.org/scala/) | Our fork of the Scala compiler +![Monocle](https://raw.githubusercontent.com/julien-truffaut/Monocle/master/image/black_icons/navbar_brand.png) | [**Monocle**](http://julien-truffaut.github.io/Monocle/) | Optics library for Scala +![ScalaCache](https://cb372.github.io/scalacache/img/navbar_brand.png) | [**ScalaCache**](https://cb372.github.io/scalacache/) | A facade for popular cache implementations, such as Caffeine, Redis, or Memcached +![scalacheck-toolbox](https://47deg.github.io/scalacheck-toolbox/img/navbar_brand.png) | [**scalacheck-toolbox**](https://47deg.github.io/scalacheck-toolbox/) | Generating sensible data with ScalaCheck +![Algebird](https://twitter.github.io/algebird/img/navbar_brand.png) | [**Algebird**](https://twitter.github.io/algebird/) | Algebraic typeclasses and data structures for big data +![Scalding](https://twitter.github.io/scalding/img/navbar_brand.png) | [**Scalding**](https://twitter.github.io/scalding/) | Scala API for Hadoop and Cascading +![Finch](https://finagle.github.io/finch/img/navbar_brand.png) | [**Finch**](https://finagle.github.io/finch/) | A combinator API over the Finagle HTTP services +![fetch](https://47deg.github.io/fetch/img/navbar_brand.png) | [**fetch**](https://47deg.github.io/fetch/) | Simple & Efficient data access for Scala and Scala.js +![github4s](https://47deg.github.io/github4s/img/navbar_brand.png) | [**github4s**](https://47deg.github.io/github4s/) | A GitHub API wrapper written in Scala +![hammock](https://pepegar.github.io/hammock/img/navbar_brand.png) | [**hammock**](https://pepegar.github.io/hammock/) | A purely functional HTTP client for Scala +![cron4s](https://alonsodomin.github.io/cron4s/img/navbar_brand.png) | [**cron4s**](https://alonsodomin.github.io/cron4s) | A CRON expression parser and AST for Scala +![freestyle](http://frees.io/img/navbar_brand.png) | [**freestyle**](http://frees.io/) | A cohesive & pragmatic framework of FP centric Scala libraries +![libra](https://to-ithaca.github.io/libra/img/navbar_brand.png) | [**libra**](https://to-ithaca.github.io/libra) |A dimensional analysis library based on dependent types +![Scanamo](http://www.scanamo.org/img/navbar_brand.png) | [**Scanamo**](http://www.scanamo.org) | Simpler DynamoDB access for Scala +![Mocked Streams](https://mockedstreams.madewithtea.com/img/navbar_brand.png) | [**Mocked Streams**](https://mockedstreams.madewithtea.com) | Scala DSL for Unit-Testing Kafka Streams Topologies +![sbt-kubeyml](http://sbt-kubeyml.vaslabs.org/img/navbar_brand.png) | [**sbt-kubeyml**](http://sbt-kubeyml.vaslabs.org) | Typesafe Kubernetes manifests to deploy Scala applications + +# Copyright + +sbt-microsites is designed and developed by 47 Degrees + +Copyright (C) 2016-2020 47 Degrees. diff --git a/docs/docs/docs/build-the-microsite.md b/microsite/docs/docs/build-the-microsite.md similarity index 100% rename from docs/docs/docs/build-the-microsite.md rename to microsite/docs/docs/build-the-microsite.md diff --git a/docs/docs/docs/customize.md b/microsite/docs/docs/customize.md similarity index 100% rename from docs/docs/docs/customize.md rename to microsite/docs/docs/customize.md diff --git a/docs/docs/docs/getting-started.md b/microsite/docs/docs/getting-started.md similarity index 93% rename from docs/docs/docs/getting-started.md rename to microsite/docs/docs/getting-started.md index 680ad87c..61defe9e 100644 --- a/docs/docs/docs/getting-started.md +++ b/microsite/docs/docs/getting-started.md @@ -45,14 +45,10 @@ To begin, add the following lines to the `project/plugins.sbt` file within your Latest release: -[comment]: # (Start Replace) - ```bash -addSbtPlugin("com.47deg" % "sbt-microsites" % "1.1.5") +addSbtPlugin("com.47deg" % "sbt-microsites" % "@VERSION@") ``` -[comment]: # (End Replace) - Finally, to enable the plugin, add this to your `build.sbt` file: ```bash diff --git a/docs/docs/docs/intro.md b/microsite/docs/docs/intro.md similarity index 100% rename from docs/docs/docs/intro.md rename to microsite/docs/docs/intro.md diff --git a/docs/docs/docs/layouts.md b/microsite/docs/docs/layouts.md similarity index 100% rename from docs/docs/docs/layouts.md rename to microsite/docs/docs/layouts.md diff --git a/docs/docs/docs/publish-with-travis.md b/microsite/docs/docs/publish-with-travis.md similarity index 100% rename from docs/docs/docs/publish-with-travis.md rename to microsite/docs/docs/publish-with-travis.md diff --git a/docs/docs/docs/settings.md b/microsite/docs/docs/settings.md similarity index 100% rename from docs/docs/docs/settings.md rename to microsite/docs/docs/settings.md diff --git a/docs/docs/docs/troubleshooting.md b/microsite/docs/docs/troubleshooting.md similarity index 100% rename from docs/docs/docs/troubleshooting.md rename to microsite/docs/docs/troubleshooting.md diff --git a/docs/docs/docs/typechecked-snippets.md b/microsite/docs/docs/typechecked-snippets.md similarity index 100% rename from docs/docs/docs/typechecked-snippets.md rename to microsite/docs/docs/typechecked-snippets.md diff --git a/docs/docs/index.md b/microsite/docs/index.md similarity index 100% rename from docs/docs/index.md rename to microsite/docs/index.md diff --git a/docs/src/main/resources/microsite/data/menu.yml b/microsite/src/main/resources/microsite/data/menu.yml similarity index 100% rename from docs/src/main/resources/microsite/data/menu.yml rename to microsite/src/main/resources/microsite/data/menu.yml diff --git a/project/build.properties b/project/build.properties index b53dc26f..cb6a5a8a 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version = 1.3.10 +sbt.version = 1.3.13 diff --git a/project/dependencies.sbt b/project/dependencies.sbt new file mode 100644 index 00000000..a62f6ba4 --- /dev/null +++ b/project/dependencies.sbt @@ -0,0 +1,12 @@ +// So the plugin is used in its own build +unmanagedSourceDirectories in Compile += + baseDirectory.in(ThisBuild).value.getParentFile / "src" / "main" / "scala" +unmanagedResourceDirectories in Compile += + baseDirectory.in(ThisBuild).value.getParentFile / "src" / "main" / "resources" + +libraryDependencies ++= Seq( + "com.47deg" %% "github4s" % "0.24.0", + "net.jcazevedo" %% "moultingyaml" % "0.4.2", + "com.lihaoyi" %% "scalatags" % "0.9.0", + "com.sksamuel.scrimage" %% "scrimage-core" % "2.1.8" +) diff --git a/project/plugins.sbt b/project/plugins.sbt index 07f9dbe1..7726f0a1 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,26 +1,11 @@ -import sbt.Resolver.sonatypeRepo - -resolvers ++= Seq(sonatypeRepo("snapshots"), sonatypeRepo("releases")) - -addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.9.0") -addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.3") -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.3.4") -addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.4.0") -addSbtPlugin("com.alejandrohdezma" %% "sbt-github" % "0.6.0") -addSbtPlugin("com.alejandrohdezma" % "sbt-github-header" % "0.6.0") -addSbtPlugin("com.alejandrohdezma" % "sbt-github-mdoc" % "0.6.0") -addSbtPlugin("com.alejandrohdezma" % "sbt-mdoc-toc" % "0.2") -addSbtPlugin("org.tpolecat" % "tut-plugin" % "0.6.13") -addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.0") -addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.3") -addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.4.0") - -unmanagedSourceDirectories in Compile ++= Seq( - baseDirectory.in(ThisBuild).value.getParentFile / "src" / "main" / "scala" -) -libraryDependencies ++= Seq( - "com.47deg" %% "github4s" % "0.24.0", - "net.jcazevedo" %% "moultingyaml" % "0.4.2", - "com.lihaoyi" %% "scalatags" % "0.9.0", - "com.sksamuel.scrimage" %% "scrimage-core" % "2.1.8" -) +addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.3") +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.0") +addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0") +addSbtPlugin("com.alejandrohdezma" % "sbt-github" % "0.8.1") +addSbtPlugin("com.alejandrohdezma" % "sbt-github-header" % "0.8.1") +addSbtPlugin("com.alejandrohdezma" % "sbt-github-mdoc" % "0.8.1") +addSbtPlugin("com.alejandrohdezma" % "sbt-remove-test-from-pom" % "0.1.0") +addSbtPlugin("org.tpolecat" % "tut-plugin" % "0.6.13") +addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.3") +addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.3") +addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.4.0") diff --git a/src/main/scala/microsites/util/MicrositeHelper.scala b/src/main/scala/microsites/util/MicrositeHelper.scala index a7a49c04..a17d646d 100644 --- a/src/main/scala/microsites/util/MicrositeHelper.scala +++ b/src/main/scala/microsites/util/MicrositeHelper.scala @@ -17,7 +17,9 @@ package microsites.util import java.io.File +import java.net.URL +import cats.syntax.either._ import com.sksamuel.scrimage._ import microsites.util.YamlFormats._ import microsites._ @@ -53,23 +55,31 @@ class MicrositeHelper(config: MicrositeSettings) { MicrositeFavicon(filename, s"${width}x$height") } + def copyJAROrFolder( + jarUrl: URL, + output: String, + filter: String = "" + ): Either[Exceptions.IOException, Any] = + copyJARResourcesTo(jarUrl, output, filter) + .orElse(copyFilesRecursively(jarUrl.getFile + filter, output + filter)) + def createResources(resourceManagedDir: File): List[File] = { val targetDir: String = resourceManagedDir.getAbsolutePath.ensureFinalSlash val pluginURL: URL = getClass.getProtectionDomain.getCodeSource.getLocation - copyJARResourcesTo(pluginURL, s"$targetDir$jekyllDir/", "_sass") - copyJARResourcesTo(pluginURL, s"$targetDir$jekyllDir/", "css") - copyJARResourcesTo(pluginURL, s"$targetDir$jekyllDir/", "img") - copyJARResourcesTo(pluginURL, s"$targetDir$jekyllDir/", "js") - copyJARResourcesTo(pluginURL, s"$targetDir$jekyllDir/", "highlight/highlight.pack.js") - copyJARResourcesTo(pluginURL, s"$targetDir$jekyllDir/", "highlight/LICENSE") - copyJARResourcesTo( + copyJAROrFolder(pluginURL, s"$targetDir$jekyllDir/", "_sass") + copyJAROrFolder(pluginURL, s"$targetDir$jekyllDir/", "css") + copyJAROrFolder(pluginURL, s"$targetDir$jekyllDir/", "img") + copyJAROrFolder(pluginURL, s"$targetDir$jekyllDir/", "js") + copyJAROrFolder(pluginURL, s"$targetDir$jekyllDir/", "highlight/highlight.pack.js") + copyJAROrFolder(pluginURL, s"$targetDir$jekyllDir/", "highlight/LICENSE") + copyJAROrFolder( pluginURL, s"$targetDir$jekyllDir/", s"highlight/styles/${config.visualSettings.highlightTheme}.css" ) - copyJARResourcesTo(pluginURL, s"$targetDir$jekyllDir/", "plugins") + copyJAROrFolder(pluginURL, s"$targetDir$jekyllDir/", "plugins") copyFilesRecursively( config.fileLocations.micrositeImgDirectory.getAbsolutePath,