diff --git a/.github/workflows/check-build-test.yml b/.github/workflows/check-build-test.yml index 9f201db..7aafca1 100644 --- a/.github/workflows/check-build-test.yml +++ b/.github/workflows/check-build-test.yml @@ -47,9 +47,10 @@ jobs: with: jvm: ${{ matrix.jvmName }} - - name: Install Jekyll, Nanoc, Asciidoctor + - name: Install Jekyll, Nanoc, Asciidoctor, sphinx run: |- sudo gem install jekyll:3.8.4 nanoc:4.0.2 asciidoctor --no-document + pip3 install --user sphinx # npm install -g gitbook-cli@2.3.2 # gitbook install 3.2.3 diff --git a/build.sbt b/build.sbt index e24c6ec..6c41fca 100644 --- a/build.sbt +++ b/build.sbt @@ -52,7 +52,7 @@ lazy val root = project .withRepository(uri("https://github.com/sbt/sbt-site")) } ) - .aggregate(core, asciidoctor, gitbook, paradox) + .aggregate(core, asciidoctor, gitbook, paradox, sphinx) .enablePlugins(SitePreviewPlugin, ParadoxSitePlugin, ParadoxMaterialThemePlugin) lazy val core = project @@ -139,8 +139,15 @@ lazy val paradox = project .settings(pluginSettings) .settings(commonSettings) -// https://github.com/sbt/sbt-site/issues/186 -//lazy val sphinx = project... +lazy val sphinx = project + .in(file("sphinx")) + .settings( + name := "sbt-site-sphinx", + ) + .dependsOn(core) + .enablePlugins(SbtPlugin) + .settings(pluginSettings) + .settings(commonSettings) //#ghpages-publish enablePlugins(GhpagesPlugin) diff --git a/sphinx/src/sbt-test/sphinx/can-use-sphinx/project/plugins.sbt b/sphinx/src/sbt-test/sphinx/can-use-sphinx/project/plugins.sbt index 4dae1a0..4d9d595 100644 --- a/sphinx/src/sbt-test/sphinx/can-use-sphinx/project/plugins.sbt +++ b/sphinx/src/sbt-test/sphinx/can-use-sphinx/project/plugins.sbt @@ -1 +1 @@ -addSbtPlugin("com.github.sbt" % "sbt-site" % sys.props("project.version")) +addSbtPlugin("com.github.sbt" % "sbt-site-sphinx" % sys.props("project.version")) diff --git a/sphinx/src/sbt-test/sphinx/can-use-sphinx/test b/sphinx/src/sbt-test/sphinx/can-use-sphinx/test index 1274d4b..9f9a269 100644 --- a/sphinx/src/sbt-test/sphinx/can-use-sphinx/test +++ b/sphinx/src/sbt-test/sphinx/can-use-sphinx/test @@ -1,3 +1,2 @@ -# 2022-12-16 ennru: Ignore in GH workflow -# > makeSite -# > checkContent +> makeSite +> checkContent diff --git a/src/main/paradox/generators/sphinx.md b/src/main/paradox/generators/sphinx.md index 21aab26..b38ebbd 100644 --- a/src/main/paradox/generators/sphinx.md +++ b/src/main/paradox/generators/sphinx.md @@ -1,8 +1,16 @@ # Sphinx -The sbt-site plugin has direct support for building [Sphinx] projects. To enable Sphinx site generation, simply enable the associated plugin in your `build.sbt` file: +The sbt-site plugin has direct support for building [Sphinx] projects. -## The Sphinx integration is not (yet) included in this version of sbt-site. +To enable the "sbt site Sphinx" plugin in your sbt project, add the following to your `project/plugins.sbt` file: + +@@@ vars +```sbt +addSbtPlugin("com.github.sbt" % "sbt-site-sphinx" % "$project.version$") +``` +@@@ + +And enable the `SphinxPlugin` plugin in your `build.sbt` file: @@ snip[enablePlugin](/sphinx/src/sbt-test/sphinx/can-use-sphinx/build.sbt) { #enablePlugin }