-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docs: more settings to improve the generated site (#579)
* Docs: more settings to improve the generated site * Move settings to Common auto-plugin * No CrossVersion.binary
- Loading branch information
Showing
6 changed files
with
75 additions
and
48 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<script type="text/javascript" src="$page.base$assets/js/warnOldVersion.js"></script> | ||
<script type="text/javascript">//<![CDATA[ | ||
jQuery(function(jq){initOldVersionWarnings(jq, '$page.properties.("project.version")$', '$page.properties.("project.url")$')}); | ||
//]]></script> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
function initOldVersionWarnings($, thisVersion, projectUrl) { | ||
if (projectUrl && projectUrl !== "") { | ||
var schemeLessUrl = projectUrl; | ||
if (projectUrl.startsWith("http://")) projectUrl = schemeLessUrl.substring(5); | ||
else if (projectUrl.startsWith("https://")) projectUrl = schemeLessUrl.substring(6); | ||
const url = schemeLessUrl + (schemeLessUrl.endsWith("\/") ? "" : "/") + "paradox.json"; | ||
$.get(url, function (versionData) { | ||
const currentVersion = versionData.version; | ||
if (thisVersion !== currentVersion) { | ||
showVersionWarning(thisVersion, currentVersion, projectUrl); | ||
} | ||
}); | ||
} | ||
} | ||
|
||
function showVersionWarning(thisVersion, currentVersion, projectUrl) { | ||
$('#docs').prepend( | ||
'<div class="callout warning" style="margin-top: 16px">' + | ||
'<p><span style="font-weight: bold">This documentation regards version ' + thisVersion + ', ' + | ||
'however the current version is <a href="' + projectUrl + '">' + currentVersion + '</a>.</span></p>' + | ||
'</div>' | ||
); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import sbt.Keys._ | ||
import sbt._ | ||
import sbt.plugins.JvmPlugin | ||
|
||
object Common extends AutoPlugin { | ||
|
||
override def trigger = allRequirements | ||
|
||
override def requires = JvmPlugin | ||
|
||
override def globalSettings = Seq( | ||
organization := "com.lightbend.akka.grpc", | ||
organizationName := "Lightbend Inc.", | ||
organizationHomepage := Some(url("https://www.lightbend.com/")), | ||
// apiURL := Some(url(s"https://doc.akka.io/api/akka-grpc/${version.value}")), | ||
homepage := Some(url("https://akka.io/")), | ||
scmInfo := Some(ScmInfo(url("https://github.com/akka/akka-grpc"), "git@github.com:akka/akka-grpc")), | ||
developers += Developer("contributors", | ||
"Contributors", | ||
"https://gitter.im/akka/dev", | ||
url("https://github.com/akka/akka-grpc/graphs/contributors")), | ||
licenses := Seq("Apache-2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0")), | ||
description := "Akka gRPC - Support for building streaming gRPC servers and clients on top of Akka Streams." | ||
) | ||
|
||
override lazy val projectSettings = Seq( | ||
scalacOptions ++= List( | ||
"-unchecked", | ||
"-deprecation", | ||
"-language:_", | ||
"-encoding", "UTF-8" | ||
), | ||
javacOptions ++= List( | ||
"-Xlint:unchecked", | ||
"-Xlint:deprecation" | ||
) | ||
) ++ akka.grpc.Formatting.formatSettings | ||
} |
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
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