Skip to content

Commit

Permalink
Make incubator notice optional
Browse files Browse the repository at this point in the history
  • Loading branch information
mdedetrich committed Feb 26, 2024
1 parent 023c449 commit 6fc4a56
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
11 changes: 10 additions & 1 deletion plugin/src/main/scala/org/apache/pekko/PekkoParadoxPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,15 @@ object PekkoParadoxPlugin extends AutoPlugin {
object autoImport {
val pekkoParadoxCopyright = settingKey[String]("Copyright text to use in docs footer")
val pekkoParadoxGithub = settingKey[Option[String]]("Link to Github repository")
val pekkoParadoxIncubatorNotice = settingKey[Option[String]]("Whether to include the ASF incubator notice")
}
import autoImport._

val version = ParadoxPlugin.readProperty("pekko-paradox.properties", "pekko.paradox.version")

val incubatorNoticeText =
"Apache Pekko is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF."

override def requires = ParadoxPlugin

override def trigger = noTrigger
Expand All @@ -46,12 +50,17 @@ object PekkoParadoxPlugin extends AutoPlugin {
def pekkoParadoxGlobalSettings: Seq[Setting[_]] = Seq(
paradoxTheme := Some("org.apache.pekko" % "pekko-theme-paradox" % version),
// Target hostname for static assets (CSS, JS, Icons, Font)
paradoxProperties ++= Map("assets.hostname" -> "https://pekko.apache.org/"),
paradoxProperties ++= {
Map("assets.hostname" -> "https://pekko.apache.org/") ++
pekkoParadoxIncubatorNotice.value.map(incubatorNotice => Map("incubator.notice" -> incubatorNotice)).getOrElse(
Map.empty)
},
paradoxNavigationIncludeHeaders := true,
pekkoParadoxCopyright in Global :=
"""Copyright © 2011-2022 <a href="https://www.lightbend.com/">Lightbend, Inc</a>.
| Apache Pekko, Pekko, and its feather logo are trademarks of The Apache Software Foundation.""".stripMargin,
pekkoParadoxGithub in Global := None,
pekkoParadoxIncubatorNotice in Global := Some(incubatorNoticeText),
Compile / paradoxMaterialTheme := {
val theme =
(Compile / paradoxMaterialTheme).value
Expand Down
8 changes: 5 additions & 3 deletions theme/src/main/assets/partials/footer.st
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,11 @@ $!
</a>
</div>
<div class="incubation-disclaimer">
<p>
Apache Pekko is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.
</p>
$ if (page.properties.("incubator.notice")) $
<p>
$page.properties.("incubator.notice")$
</p>
$ endif $
</div>
<div class="md-footer-copyright">
$ if (page.properties.("material.copyright")) $
Expand Down

0 comments on commit 6fc4a56

Please sign in to comment.