Skip to content

Commit

Permalink
Revive Sphinx integration (#214)
Browse files Browse the repository at this point in the history
* Revive Sphinx integration

* Install sphinx for CI workflow
  • Loading branch information
mkurz committed Feb 29, 2024
1 parent 2164968 commit cc567fd
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/check-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
13 changes: 10 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -134,8 +134,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)
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
addSbtPlugin("com.github.sbt" % "sbt-site" % sys.props("project.version"))
addSbtPlugin("com.github.sbt" % "sbt-site-sphinx" % sys.props("project.version"))
5 changes: 2 additions & 3 deletions sphinx/src/sbt-test/sphinx/can-use-sphinx/test
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
# 2022-12-16 ennru: Ignore in GH workflow
# > makeSite
# > checkContent
> makeSite
> checkContent
12 changes: 10 additions & 2 deletions src/main/paradox/generators/sphinx.md
Original file line number Diff line number Diff line change
@@ -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 }

Expand Down

0 comments on commit cc567fd

Please sign in to comment.