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

First micro-site approach #407

Merged
merged 6 commits into from
Oct 1, 2018
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
11 changes: 7 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,12 @@ lazy val root = project

lazy val docs = project
.in(file("docs"))
.aggregate(allModules: _*)
.dependsOn(allModulesDeps: _*)
.settings(name := "frees-rpc-docs")
.settings(noPublishSettings)
.settings(docsSettings)
.enablePlugins(TutPlugin)
.settings(freesMicrositeSettings: _*)
.settings(noPublishSettings: _*)
.settings(
libraryDependencies ++= Seq(%%("scalamockScalatest") % "tut"),
scalacOptions in Tut ~= (_ filterNot Set("-Ywarn-unused-import", "-Xlint").contains)
)
.enablePlugins(MicrositesPlugin)
24 changes: 24 additions & 0 deletions docs/src/main/resources/microsite/data/menu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
options:
- title: Core concepts
url: docs/rpc/core-concepts

- title: Streaming
url: docs/rpc/streaming

- title: Annotations
url: docs/rpc/annotations

- title: IDL Generation
url: docs/rpc/idl-generation

- title: Patterns
url: docs/rpc/patterns

- title: SSL/TLS
url: docs/rpc/ssl-tls

- title: Metrics Reporting
url: docs/rpc/metrics-reporting

- title: References
url: docs/rpc/references
Binary file added docs/src/main/resources/microsite/img/third_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 0 additions & 37 deletions docs/src/main/tut/README.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
---
layout: docs
title: Quickstart
permalink: /docs/rpc/quickstart
layout: home
title: Home
technologies:
- first: ["Scala", "Frees-rpc library is completely written in Scala."]
- second: ["gRPC", "Frees-rpc combines RPC protocols, services and clients thank to gRPC framework."]
- third: ["Functional Programming", "frees-rpc is a purely functional library for building RPC endpoint based services."]
---

# Quickstart
Expand Down
5 changes: 3 additions & 2 deletions docs/src/main/tut/references.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permalink: /docs/rpc/references
* [RPC](https://en.wikipedia.org/wiki/Remote_procedure_call)
* [gRPC](https://grpc.io/)
* [Protocol Buffers Docs](https://developers.google.com/protocol-buffers/docs/overview)
* [scalamacros]: https://github.com/scalamacros/paradise
* [scalamacros](https://github.com/scalamacros/paradise)
* [PBDirect](https://github.com/btlines/pbdirect)
* [ScalaPB](https://scalapb.github.io/)
* [Monix](https://monix.io)
Expand All @@ -27,7 +27,7 @@ This is not specifically about [frees-rpc]. Very often our microservices archite

## Next Steps

If you want to delve deeper into [frees-rpc], we have a complete example at the [examples](/modules/examples) module, which is based on the [Route Guide Demo](https://grpc.io/docs/tutorials/basic/java.html#generating-client-and-server-code) originally shared by the [gRPC Java Project](https://github.com/grpc/grpc-java/tree/6ea2b8aacb0a193ac727e061bc228b40121460e3/examples/src/main/java/io/grpc/examples/routeguide).
If you want to delve deeper into [frees-rpc], we have a complete example at the [examples] module, which is based on the [Route Guide Demo](https://grpc.io/docs/tutorials/basic/java.html#generating-client-and-server-code) originally shared by the [gRPC Java Project](https://github.com/grpc/grpc-java/tree/6ea2b8aacb0a193ac727e061bc228b40121460e3/examples/src/main/java/io/grpc/examples/routeguide).

[RPC]: https://en.wikipedia.org/wiki/Remote_procedure_call
[HTTP/2]: https://http2.github.io/
Expand All @@ -42,3 +42,4 @@ If you want to delve deeper into [frees-rpc], we have a complete example at the
[Monix]: https://monix.io/
[cats-effect]: https://github.com/typelevel/cats-effect
[Metrifier]: https://github.com/47deg/metrifier
[examples]: https://github.com/frees-io/freestyle-rpc/tree/master/modules/examples
15 changes: 11 additions & 4 deletions project/ProjectPlugin.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import com.typesafe.sbt.site.jekyll.JekyllPlugin.autoImport._
import freestyle.FreestylePlugin
import freestyle.FreestylePlugin.autoImport._
import microsites.MicrositeKeys._
import sbt.Keys._
import sbt.ScriptedPlugin.autoImport._
import sbt._
Expand Down Expand Up @@ -210,10 +212,15 @@ object ProjectPlugin extends AutoPlugin {
}
)

lazy val docsSettings = Seq(
// Pointing to https://github.com/frees-io/freestyle/tree/master/docs/src/main/tut/docs/rpc
tutTargetDirectory := baseDirectory.value.getParentFile.getParentFile / "docs" / "src" / "main" / "tut" / "docs" / "rpc",
libraryDependencies ++= Seq(%%("scalamockScalatest") % "tut")
lazy val freesMicrositeSettings = Seq(
micrositeName := "Frees-rpc",
micrositeDescription := "A purely functional library for building RPC endpoint-based services",
micrositeDocumentationUrl := "/docs/rpc/core-concepts.html",
micrositeGithubOwner := "frees-io",
micrositeGithubRepo := "freestyle-rpc",
micrositeGitterChannelUrl := "47deg/freestyle",
micrositeOrganizationHomepage := "http://www.47deg.com",
includeFilter in Jekyll := "*.html" | "*.css" | "*.png" | "*.jpg" | "*.gif" | "*.js" | "*.swf" | "*.md"
)

}
Expand Down
7 changes: 4 additions & 3 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
resolvers += Resolver.sonatypeRepo("releases")
resolvers += Resolver.sonatypeRepo("snapshots")

addSbtPlugin("io.frees" % "sbt-freestyle" % "0.3.23")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.8.0")
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.3.4")
addSbtPlugin("io.frees" % "sbt-freestyle" % "0.3.23")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.8.0")
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.3.4")
addSbtPlugin("com.47deg" % "sbt-microsites" % "0.7.23")

libraryDependencies += "org.scala-sbt" %% "scripted-plugin" % sbtVersion.value