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

Revive Sphinx integration #214

Merged
merged 2 commits into from
Feb 29, 2024
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
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 [email protected]
# 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 @@ -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)
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
Loading