Giter Club home page Giter Club logo

sbt-site's Introduction

sbt-site

This sbt plugin generates project websites from static content, GitBook, Paradox, and/or Asciidoctor, and can optionally include generated Scaladoc. It is designed to work hand-in-hand with publishing plugins like sbt-ghpages.

For version 1.5.0 we removed the integrations with Jekyll, Sphinx, Pamflet, Nanoc, Hugo, and Laika as they require updates. Please see the "revive" issues.

Documentation

The documentation is available at https://www.scala-sbt.org/sbt-site/

License

sbt-site is released under a "BSD 3-Clause" license. See LICENSE for specifics and copyright declaration.

sbt-site's People

Contributors

2m avatar ansvonwa avatar ashawley avatar corruptmemory avatar dscleaver avatar eed3si9n avatar ennru avatar gitter-badger avatar harrah avatar jaceklaskowski avatar jonas avatar jsuereth avatar ktoso avatar kwark avatar larsrh avatar metasim avatar mkurz avatar nightkr avatar oalyman avatar petergram avatar pvlugter avatar rhpvorderman avatar rkuhn avatar rustedbones avatar sralmai avatar timperrett avatar tlockney avatar trobert avatar vshalts avatar xuwei-k avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sbt-site's Issues

Feature Suggestion: Generating template.properties for Pamflet

I have an idea for a feature that I could take a stab at, but I'd like to bounce the ideas off you guys first. I'd like to be able to inject my application version as specified in sbt into my template.properties file consumed by Pamflet. Based on what I see in PamfletSupport.scala, it only reads the source directory today. From there, Pamflet picks up the template.properties in produce.scala.

From my cursory glance, I believe I will need to enhance both Pamflet and sbt-site to be able to specify a different location for my template.properties which I could generate as an sbt task. Maybe by copying the entirety of the src/pamflet directory to another location where I could also drop off the template.properties file would be an option if we only update sbt-site to accept an optional parameter of where to pick it up.

That's what I've come up with thus far. Do any of you see another better approach?

Thanks,
Joe

com.jsuereth#sbt-site-plugin;0.4.0: not found

I tried following the top-level docs slavishly, and it does not seem to work for me.

I am using an sbt runner script written by Paul Philips, but I have a postulate that this does not affect resolution of sbt plugins. My project/plugins.sbt looks like this:

addSbtPlugin("com.jsuereth" % "sbt-site-plugin" % "0.4.0")

build.sbt looks like this:

site.settings

SBT output:
$ ./sbt make-site
Detected sbt version 0.11.3
Using .../.sbt/0.11.3 as sbt dir, -sbt-dir to override.
[info] Loading project definition from .../project
[info] Updating {file:.../project/}default-204d4c...
[info] Resolving com.jsuereth#sbt-site-plugin;0.4.0 ...
[warn] module not found: com.jsuereth#sbt-site-plugin;0.4.0
[warn] ==== typesafe-ivy-releases: tried
[warn] http://repo.typesafe.com/typesafe/ivy-releases/com.jsuereth/sbt-site-plugin/scala_2.9.1/sbt_0.11.3/0.4.0/ivys/ivy.xml
[warn] ==== local: tried
[warn] ....ivy2/local/com.jsuereth/sbt-site-plugin/scala_2.9.1/sbt_0.11.3/0.4.0/ivys/ivy.xml
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/com/jsuereth/sbt-site-plugin_2.9.1_0.11.3/0.4.0/sbt-site-plugin-0.4.0.pom
[info] Resolving org.scala-sbt#sbt_2.9.1;0.11.3 ...
[info] Resolving org.scala-sbt#main_2.9.1;0.11.3 ...
... (other resolved libraries omitted for brevity)
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.jsuereth#sbt-site-plugin;0.4.0: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] com.jsuereth:sbt-site-plugin:0.4.0 (sbtVersion=0.11.3, scalaVersion=2.9.1)
[warn]
[error] {file:../project/}default-204d4c/*:update: sbt.ResolveException: unresolved dependency: com.jsuereth#sbt-site-plugin;0.4.0: not found

Local libraries have been deleted.

I have also tried to add http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/ to the resolver list, but I can't get the library names to match the filenames in the repository.

Any help would be appreciated.

Add Laika as site generator

Hi,

there is pure Scala site generation engine - Laika It is quite interesting. I played with it and did my integration with sbt-site in sbt-laika-blog. Now I decided to go other way.

I realized that maybe it will better to merge that extension back to sbt-site, so it can be reused by others. If you are ready to support one more site generator then I can prepare PR for sbt-site (or you can do it your way). Does it make sense? Are you interested in PR for this site generator?

Sphinx and GitBook don't work in Windows

Sphinx is installed in the sytem. However running makeSite fails and then:

[server] $ last server/sphinx:generateHtml
[info] Generating Sphinx html documentation...
[debug] Command: sphinx-build -a -E -b html -d C:\dev\CLAP\SIPMobile\server\target\sphinx\doctrees\html -Dversion=2.0.0-RC-8.2-SNAPSHOT -Drelease=2.0.0-RC-8.2-SNAPSHOT C:\dev\CLAP\SIPMobile\docs C:\dev\CLAP\SIPMobile\server\target\sphinx\html
[debug] Environment: Map(PYTHONPATH -> )
java.io.IOException: Cannot run program "sphinx-build" (in directory "C:\dev\CLAP\SIPMobile\docs"): CreateProcess error=2, The system cannot find the file specified
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
        at sbt.SimpleProcessBuilder.run(ProcessImpl.scala:349)
        at sbt.AbstractProcessBuilder.run(ProcessImpl.scala:128)
        at sbt.AbstractProcessBuilder$$anonfun$runBuffered$1.apply(ProcessImpl.scala:159)
        at sbt.AbstractProcessBuilder$$anonfun$runBuffered$1.apply(ProcessImpl.scala:159)
        at com.typesafe.sbt.site.sphinx.CommandLineSphinxRunner$$anon$1.buffer(SphinxHelpers.scala:161)
        at sbt.AbstractProcessBuilder.runBuffered(ProcessImpl.scala:159)
        at sbt.AbstractProcessBuilder.$bang(ProcessImpl.scala:156)
        at com.typesafe.sbt.site.sphinx.CommandLineSphinxRunner$$anonfun$1.apply(SphinxHelpers.scala:119)
        at com.typesafe.sbt.site.sphinx.CommandLineSphinxRunner$$anonfun$1.apply(SphinxHelpers.scala:104)
        at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3$$anonfun$apply$4.apply(Tracked.scala:267)
        at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3$$anonfun$apply$4.apply(Tracked.scala:263)
        at sbt.Difference.apply(Tracked.scala:224)
        at sbt.Difference.apply(Tracked.scala:206)
        at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3.apply(Tracked.scala:263)
        at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3.apply(Tracked.scala:262)
        at sbt.Difference.apply(Tracked.scala:224)
        at sbt.Difference.apply(Tracked.scala:200)
        at sbt.FileFunction$$anonfun$cached$2.apply(Tracked.scala:262)
        at sbt.FileFunction$$anonfun$cached$2.apply(Tracked.scala:260)
        at com.typesafe.sbt.site.sphinx.CommandLineSphinxRunner.sphinxBuild(SphinxHelpers.scala:126)
        at com.typesafe.sbt.site.sphinx.CommandLineSphinxRunner.generateHtml(SphinxHelpers.scala:58)
        at com.typesafe.sbt.site.sphinx.SphinxPlugin$$anonfun$generateHtmlTask$1.apply(SphinxPlugin.scala:89)
        at com.typesafe.sbt.site.sphinx.SphinxPlugin$$anonfun$generateHtmlTask$1.apply(SphinxPlugin.scala:84)
        at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
        at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
        at sbt.std.Transform$$anon$4.work(System.scala:63)
        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
        at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
        at sbt.Execute.work(Execute.scala:237)
        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
        at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
        at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
        at java.lang.ProcessImpl.start(ProcessImpl.java:137)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
        at sbt.SimpleProcessBuilder.run(ProcessImpl.scala:349)
        at sbt.AbstractProcessBuilder.run(ProcessImpl.scala:128)
        at sbt.AbstractProcessBuilder$$anonfun$runBuffered$1.apply(ProcessImpl.scala:159)
        at sbt.AbstractProcessBuilder$$anonfun$runBuffered$1.apply(ProcessImpl.scala:159)
        at com.typesafe.sbt.site.sphinx.CommandLineSphinxRunner$$anon$1.buffer(SphinxHelpers.scala:161)
        at sbt.AbstractProcessBuilder.runBuffered(ProcessImpl.scala:159)
        at sbt.AbstractProcessBuilder.$bang(ProcessImpl.scala:156)
        at com.typesafe.sbt.site.sphinx.CommandLineSphinxRunner$$anonfun$1.apply(SphinxHelpers.scala:119)
        at com.typesafe.sbt.site.sphinx.CommandLineSphinxRunner$$anonfun$1.apply(SphinxHelpers.scala:104)
        at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3$$anonfun$apply$4.apply(Tracked.scala:267)
        at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3$$anonfun$apply$4.apply(Tracked.scala:263)
        at sbt.Difference.apply(Tracked.scala:224)
        at sbt.Difference.apply(Tracked.scala:206)
        at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3.apply(Tracked.scala:263)
        at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3.apply(Tracked.scala:262)
        at sbt.Difference.apply(Tracked.scala:224)
        at sbt.Difference.apply(Tracked.scala:200)
        at sbt.FileFunction$$anonfun$cached$2.apply(Tracked.scala:262)
        at sbt.FileFunction$$anonfun$cached$2.apply(Tracked.scala:260)
        at com.typesafe.sbt.site.sphinx.CommandLineSphinxRunner.sphinxBuild(SphinxHelpers.scala:126)
        at com.typesafe.sbt.site.sphinx.CommandLineSphinxRunner.generateHtml(SphinxHelpers.scala:58)
        at com.typesafe.sbt.site.sphinx.SphinxPlugin$$anonfun$generateHtmlTask$1.apply(SphinxPlugin.scala:89)
        at com.typesafe.sbt.site.sphinx.SphinxPlugin$$anonfun$generateHtmlTask$1.apply(SphinxPlugin.scala:84)
        at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
        at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
        at sbt.std.Transform$$anon$4.work(System.scala:63)
        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
        at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
        at sbt.Execute.work(Execute.scala:237)
        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
        at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
        at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:748)

Similarly for GitBook, I can capture the error if needed.

error when run preiewAuto

reproduce ,

checkout :https://github.com/ReactivePlatform/reactive-design-patterns-cn

in project docs, run previewAuto.

[IJ]sbt:ReactiveDesignPatterns> previewAuto
[error] java.nio.file.NoSuchFileException: /Users/kerr/IdeaProjects/reactive-design-patterns-cn/src/main/scala-2.12
[error] 	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
[error] 	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
[error] 	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
[error] 	at sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
[error] 	at sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:144)
[error] 	at java.nio.file.Files.readAttributes(Files.java:1737)
[error] 	at java.nio.file.FileTreeWalker.getAttributes(FileTreeWalker.java:219)
[error] 	at java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:276)
[error] 	at java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:322)
[error] 	at java.nio.file.FileTreeIterator.<init>(FileTreeIterator.java:72)
[error] 	at java.nio.file.Files.find(Files.java:3687)
[error] 	at com.typesafe.sbt.site.Compat$.$anonfun$genSources$3(Compat.scala:41)
[error] 	at scala.collection.TraversableLike.$anonfun$flatMap$1(TraversableLike.scala:241)
[error] 	at scala.collection.immutable.List.foreach(List.scala:389)
[error] 	at scala.collection.TraversableLike.flatMap(TraversableLike.scala:241)
[error] 	at scala.collection.TraversableLike.flatMap$(TraversableLike.scala:238)
[error] 	at scala.collection.immutable.List.flatMap(List.scala:352)
[error] 	at com.typesafe.sbt.site.Compat$.$anonfun$genSources$2(Compat.scala:33)
[error] 	at com.typesafe.sbt.site.Preview$.apply(preview.scala:15)
[error] 	at com.typesafe.sbt.site.SitePreviewPlugin$.$anonfun$projectSettings$4(SitePreviewPlugin.scala:46)
[error] 	at com.typesafe.sbt.site.SitePreviewPlugin$.$anonfun$projectSettings$4$adapted(SitePreviewPlugin.scala:42)
[error] 	at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error] 	at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:39)
[error] 	at sbt.std.Transform$$anon$4.work(System.scala:66)
[error] 	at sbt.Execute.$anonfun$submit$2(Execute.scala:262)
[error] 	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] 	at sbt.Execute.work(Execute.scala:271)
[error] 	at sbt.Execute.$anonfun$submit$1(Execute.scala:262)
[error] 	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:174)
[error] 	at sbt.CompletionService$$anon$2.call(CompletionService.scala:36)
[error] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] 	at java.lang.Thread.run(Thread.java:748)
[error] (previewAuto) java.nio.file.NoSuchFileException: /Users/kerr/IdeaProjects/reactive-design-patterns-cn/src/main/scala-2.12
[error] Total time: 0 s, completed 2018-1-8 18:24:10

Support scaladoc for subprojects

Putting site.includeScaladoc() in the top build file wasn't enough to get the scaladocs for the whole project included in site.

Including sbt-site and the site.includeScaladoc() setting in subprojects gets the scaladoc into the zip file. However, that's not useful for putting together a zip file for the whole site.

Please add something to include subprojects' scaladocs via the top-level package-site command. I suspect each subproject should be able to include or exclude itself from the site, with everything included by default.

Thanks,

Dave

Eating your own dog food

The plugin itself can be a good example how to use it.
Why not to use Sphinx to produce documentation ? I am struggling a few hours to produce Sphinx documentation with this plugin without any progress...

Paradox setup guide needs attention

Hi,

Spent a hour trying to work this out and thought I'd share. I'd do a PR but I still don't know if this is really right.

I had paradox running correctly. Decided to add the sbt ghpages plugin and that guide says "first setup sbt site". Ok, but being a so and so I've already add the ghpages stuff to build.sbt.

I'm using all the defaults taken straight from the setup guides so my build.sbt looks like this:

enablePlugins(ParadoxSitePlugin)

lazy val root = (project in file(".")).
  enablePlugins(ParadoxPlugin).
  settings(
    name := "My docs",
    paradoxTheme := Some(builtinParadoxTheme("generic"))
  )

ghpages.settings

git.remoteRepo := "[email protected]:<xxx>"

Hmmmm.... this does not work.

First it complains about a missing siteSubdirName value in the paradox settings. I've noticed (by googling, after many attempts at guessing the value - it's late here! :-) ) that a build has gone through where this defaults to empty string, so that's what I've done. Some sort of warning in the docs would have been good though.

Then it complains about an empty iterator with paradoxMarkdownToHtml. Turns out that paradox uses src/main/paradox by default while sbt site's paradox plugin expects src/paradox. Again, not obvious.

This seems to work:

enablePlugins(ParadoxSitePlugin)

sourceDirectory in Paradox := sourceDirectory.value / "main" / "paradox"

lazy val root = (project in file(".")).
  enablePlugins(ParadoxPlugin).
  settings(
    name := "My docs",
    siteSubdirName in Paradox := "",
    paradoxTheme := Some(builtinParadoxTheme("generic"))
  )

ghpages.settings

git.remoteRepo := "[email protected]:<xxx>"

Just needs a slight tweak to the docs please.

Cheers,

Dave

previewAuto cause error on Windows 10 system,previewSite works

IJ]sbt:PragmaticScala> previewAuto
[error] java.nio.file.NoSuchFileException: C:\Users\kerr\IdeaProjects\Pragmatic-Scala\src\main\scala-2.12
[error]         at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:79)
[error]         at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
[error]         at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
[error]         at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:53)
[error]         at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:38)
[error]         at sun.nio.fs.WindowsFileSystemProvider.readAttributes(WindowsFileSystemProvider.java:193)
[error]         at java.nio.file.Files.readAttributes(Files.java:1737)
[error]         at java.nio.file.FileTreeWalker.getAttributes(FileTreeWalker.java:219)
[error]         at java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:276)
[error]         at java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:322)
[error]         at java.nio.file.FileTreeIterator.<init>(FileTreeIterator.java:72)
[error]         at java.nio.file.Files.find(Files.java:3687)
[error]         at com.typesafe.sbt.site.Compat$.$anonfun$genSources$3(Compat.scala:41)
[error]         at scala.collection.TraversableLike.$anonfun$flatMap$1(TraversableLike.scala:241)
[error]         at scala.collection.immutable.List.foreach(List.scala:389)
[error]         at scala.collection.TraversableLike.flatMap(TraversableLike.scala:241)
[error]         at scala.collection.TraversableLike.flatMap$(TraversableLike.scala:238)
[error]         at scala.collection.immutable.List.flatMap(List.scala:352)
[error]         at com.typesafe.sbt.site.Compat$.$anonfun$genSources$2(Compat.scala:33)
[error]         at com.typesafe.sbt.site.Preview$.apply(preview.scala:15)
[error]         at com.typesafe.sbt.site.SitePreviewPlugin$.$anonfun$projectSettings$4(SitePreviewPlugin.scala:46)
[error]         at com.typesafe.sbt.site.SitePreviewPlugin$.$anonfun$projectSettings$4$adapted(SitePreviewPlugin.scala:42)
[error]         at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error]         at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:42)
[error]         at sbt.std.Transform$$anon$4.work(System.scala:64)
[error]         at sbt.Execute.$anonfun$submit$2(Execute.scala:257)
[error]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error]         at sbt.Execute.work(Execute.scala:266)
[error]         at sbt.Execute.$anonfun$submit$1(Execute.scala:257)
[error]         at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:167)
[error]         at sbt.CompletionService$$anon$2.call(CompletionService.scala:32)
[error]         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error]         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error]         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error]         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error]         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error]         at java.lang.Thread.run(Thread.java:748)
[error] (*:previewAuto) java.nio.file.NoSuchFileException: C:\Users\kerr\IdeaProjects\Pragmatic-Scala\src\main\scala-2.12

Generated Paradox site contains copy of intermediate theme and HTML files

As noted here in lightbend/ssl-config#51 the generated Paradox site contains the intermediate files from running Paradox. For example, the scripted paradox/can-use-paradox fails when applying the following patch in sbt-site:

diff --git i/src/sbt-test/paradox/can-use-paradox/build.sbt w/src/sbt-test/paradox/can-use-paradox/build.sbt
index f15d922..691db2e 100644
--- i/src/sbt-test/paradox/can-use-paradox/build.sbt
+++ w/src/sbt-test/paradox/can-use-paradox/build.sbt
@@ -10,5 +10,10 @@ lazy val root = (project in file(".")).
       assert(index.exists, s"${index.getAbsolutePath} did not exist")
       val content = IO.readLines(index)
       assert(content.exists(_.contains("Paradox Testing")), s"Did not find expected content in:\n${content.mkString("\n")}")
+
+      for (path <- Seq("html/index.html", "theme/page.st")) {
+        val file = dest / "paradox" / path
+        assert(!file.exists, s"$file should not exist")
+      }
     }
   )

Here's a listing of the files generated by makeSite showing the intermediate files inside the paradox directory:

[info] .../can-use-paradox/target/site/docs
[info] .../can-use-paradox/target/site/docs/css
[info] .../can-use-paradox/target/site/docs/css/fonts
[info] .../can-use-paradox/target/site/docs/css/fonts/icons.eot
[info] .../can-use-paradox/target/site/docs/css/fonts/icons.svg
[info] .../can-use-paradox/target/site/docs/css/fonts/icons.ttf
[info] .../can-use-paradox/target/site/docs/css/fonts/icons.woff
[info] .../can-use-paradox/target/site/docs/css/page.css
[info] .../can-use-paradox/target/site/docs/index.html
[info] .../can-use-paradox/target/site/docs/js
[info] .../can-use-paradox/target/site/docs/js/magellan.js
[info] .../can-use-paradox/target/site/docs/js/page.js
[info] .../can-use-paradox/target/site/docs/lib
[info] .../can-use-paradox/target/site/docs/lib/foundation
[info] .../can-use-paradox/target/site/docs/lib/foundation/dist
[info] .../can-use-paradox/target/site/docs/lib/foundation/dist/foundation.min.css
[info] .../can-use-paradox/target/site/docs/lib/foundation/dist/foundation.min.js
[info] .../can-use-paradox/target/site/docs/lib/jquery
[info] .../can-use-paradox/target/site/docs/lib/jquery/jquery.min.js
[info] .../can-use-paradox/target/site/docs/lib/normalize.css
[info] .../can-use-paradox/target/site/docs/lib/normalize.css/normalize.css
[info] .../can-use-paradox/target/site/docs/lib/prettify
[info] .../can-use-paradox/target/site/docs/lib/prettify/lang-scala.js
[info] .../can-use-paradox/target/site/docs/lib/prettify/prettify.css
[info] .../can-use-paradox/target/site/docs/lib/prettify/prettify.js
[info] .../can-use-paradox/target/site/docs/paradox
[info] .../can-use-paradox/target/site/docs/paradox/html
[info] .../can-use-paradox/target/site/docs/paradox/html/index.html
[info] .../can-use-paradox/target/site/docs/paradox/theme
[info] .../can-use-paradox/target/site/docs/paradox/theme/css
[info] .../can-use-paradox/target/site/docs/paradox/theme/css/fonts
[info] .../can-use-paradox/target/site/docs/paradox/theme/css/fonts/icons.eot
[info] .../can-use-paradox/target/site/docs/paradox/theme/css/fonts/icons.svg
[info] .../can-use-paradox/target/site/docs/paradox/theme/css/fonts/icons.ttf
[info] .../can-use-paradox/target/site/docs/paradox/theme/css/fonts/icons.woff
[info] .../can-use-paradox/target/site/docs/paradox/theme/css/page.css
[info] .../can-use-paradox/target/site/docs/paradox/theme/js
[info] .../can-use-paradox/target/site/docs/paradox/theme/js/magellan.js
[info] .../can-use-paradox/target/site/docs/paradox/theme/js/page.js
[info] .../can-use-paradox/target/site/docs/paradox/theme/lib
[info] .../can-use-paradox/target/site/docs/paradox/theme/lib/foundation
[info] .../can-use-paradox/target/site/docs/paradox/theme/lib/foundation/dist
[info] .../can-use-paradox/target/site/docs/paradox/theme/lib/foundation/dist/foundation.min.css
[info] .../can-use-paradox/target/site/docs/paradox/theme/lib/foundation/dist/foundation.min.js
[info] .../can-use-paradox/target/site/docs/paradox/theme/lib/jquery
[info] .../can-use-paradox/target/site/docs/paradox/theme/lib/jquery/jquery.min.js
[info] .../can-use-paradox/target/site/docs/paradox/theme/lib/normalize.css
[info] .../can-use-paradox/target/site/docs/paradox/theme/lib/normalize.css/normalize.css
[info] .../can-use-paradox/target/site/docs/paradox/theme/lib/prettify
[info] .../can-use-paradox/target/site/docs/paradox/theme/lib/prettify/lang-scala.js
[info] .../can-use-paradox/target/site/docs/paradox/theme/lib/prettify/prettify.css
[info] .../can-use-paradox/target/site/docs/paradox/theme/lib/prettify/prettify.js
[info] .../can-use-paradox/target/site/docs/paradox/theme/menu.st
[info] .../can-use-paradox/target/site/docs/paradox/theme/navigation.st
[info] .../can-use-paradox/target/site/docs/paradox/theme/page.st
[info] .../can-use-paradox/target/site/docs/paradox/theme/title.st

Implement a generic substitution mechanism

Sphinx's builtin substitution is broken and essentially unusable:

https://www.assembla.com/spaces/akka/tickets/2461

The Akka team has researched this quite a bit and do not see any obvious solution except for copying the docs to a temporary dir and use sed/find-replace and then run the Sphinx on those.

We need to support things like:

inserting scala versions, artifact versions, project versions etc. Ideally the substitutions should be defined in SBT.

previewSite exhibiting race condition on sub-projects

I am running sbt-site on a repo having multiple sub-projects. The makeSite target seems to be generating correctly but when I try to run previewSite (or previewAuto), the server seems to start serving one of the sub-projects, randomly, instead of the "root" project I defined to collect all the subproject output in. As if it is trying to start the server on all subprojects and one is winning?

My build.sbt at the time of filing is:
https://github.com/erikerlandson/coulomb/blob/f8080dd6c7671034aa38aadd2b2769f52a978623/build.sbt

command would be xsbt coulomb_docs/previewSite

jekyll instructions needed

Docs do not seem to mention if I need to install ruby, and jekyll gem or if the sbt plugin should handle all that with some jruby magic. What is the minimal setup needed to get the jekyll plugin working?

I tried today and I got an IO exception saying jekyll not found.

Changing the "site" directory

Pardon my lack of sbt-fu but I don't see how I can change the plugin from getting the files from src/site to target/specs2-reports for example. What should I declare in my build.sbt file to do that? If you show me I'll make a pull request to include that in the README :-).

Also, what would be the right approach if I had files that I want to grab from different directories:

target/
scala-2.9.1/doc <- here
scala-2.9.2/doc
specs2-reports/ <- and here

Thanks.

support for sbt's '~'

I was expecting that running ~ make-site is sbt would regenerate the site every time a file was modified, but it is not doing anything.

I suppose it is a matter of associating the right set of 'source files' to the make-site task. It would be great if it was configured by default.

ParadoxSitePlugin appears to be incompatible with latest paradox release

When running sbt-site version 1.1.0 with sbt-paradox version 0.2.3 and the default ("generic") paradox-theme no assets (JS/CSS) are produced to the target/site directory.

Seeing that the paradox support in sbt-site was built against sbt-paradox 0.2.0 I'm assuming that some additional settings are now required to make paradox produce the theme assets in its output directory (so they can then be copied over to target/site).

An upgrade to sbt-paradox version 0.2.3 would be great!

ScalaTags plugin

Is there any interest in a ScalaTags plugin? If it would be considered for merging, I'd be happy to provide a PR for the initial implementation.

I find it to be quite nice for building websites -- if you already know Scala, you simply use its constructs for composition and code organization, leveraging your existing knowledge of the language.

Preview task is launched for each aggregated submodule

Since the introduction of sbt-site as a collection of auto plugins, the previewSite task is launched by each submodule, if the sbt project follow this pattern:

  • An auto plugin, let's say SphinxPlugin, is enabled on the root project, which has some aggregated submodules
  • Running sbt previewSite will result in each module trying to run the task

However, only the parent project will actually run makeSite. If one of the submodule manages to open jetty before the parent project can make the site, the opened url will be empty:

screen shot 2016-06-03 at 17 31 44

This behavior does not happen on 0.8.2, where the settings are set directly on the root project and no inheritance seems to occur.

I'm not sure how I could enable the SphinxPlugin without getting what the doc says:

Aggregation means that running a task on the aggregate project will also run it on the aggregated projects. 

0.4.0 for 0.11.2

Dear Josh,

thanks for your quick reply on twitter. As requested i am opening a ticket requesting a build for 0.4.0 on sbt 0.11.2 :)

Thank you in advance!

Provide a search box for the current version of the documentation on the web site

Here is the HTML for Google:

<!-- Use of this code assumes agreement with the Google Custom Search Terms of Service. -->
<!-- The terms of service are available at http://www.google.com//cse/docs/tos.html -->
<form name="cse" id="searchbox_demo" action="https://www.google.com/cse">
  <input type="hidden" name="cref" value="" />
  <input type="hidden" name="ie" value="utf-8" />
  <input type="hidden" name="hl" value="" />
  <input name="q" type="text" size="40" />
  <input type="submit" name="sa" value="Search" />
</form>
<script type="text/javascript" src="https%3A%2F%2Fcse.google.com%2Fcse/tools/onthefly?form=searchbox_demo&lang="></script>

Here is a link to a search form.

You could use duckduckgo or whatever, I don't care. The important thing is that the current version of the docs be searchable. The current state causes people to land on outdated documentation without realizing it.

requiredGems: reference is ambiguous

Attempting to use requiredGems in the can-use-jekyll sbt-test fails with:

[error] .../can-use-jekyll/build.sbt:13: error: reference to requiredGems is ambiguous;
[error] it is imported twice in the same scope by
[error] import _root_.com.typesafe.sbt.site.nanoc.NanocPlugin.autoImport._
[error] and import _root_.com.typesafe.sbt.site.jekyll.JekyllPlugin.autoImport._
[error] requiredGems := Map(
[error] ^

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.