Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 01 2020 19:37
    ennru opened #165
  • Nov 01 2020 18:48
    ennru synchronize #162
  • Nov 01 2020 18:45
    ennru review_requested #163
  • Oct 22 2020 09:39
    ennru closed #161
  • Oct 22 2020 09:39
    ennru commented #161
  • Oct 22 2020 09:02
    ennru synchronize #163
  • Oct 22 2020 03:17
    eed3si9n commented #163
  • Oct 22 2020 03:11

    eed3si9n on develop

    Update Travis CI file I notice… Merge pull request #164 from ee… (compare)

  • Oct 22 2020 03:11
    eed3si9n closed #164
  • Oct 22 2020 02:50
    eed3si9n opened #164
  • Sep 26 2020 18:42
    ennru synchronize #163
  • Sep 26 2020 18:10
    eatkins commented #163
  • Sep 26 2020 15:34
    ennru opened #163
  • Sep 25 2020 19:58
    ennru opened #162
  • Sep 24 2020 08:45
    ennru review_requested #161
  • Sep 24 2020 08:21
    ennru opened #161
  • Sep 24 2020 07:48
    ennru milestoned #156
  • Sep 24 2020 07:48
    ennru commented #157
  • Sep 24 2020 07:48

    ennru on develop

    Add Asciidoctor attribute suppo… (compare)

  • Sep 24 2020 07:48
    ennru closed #157
Nicolas Rinaudo
@nrinaudo

I'm trying to do something which I think is not supported out of the box, but sounds like it should be straightforward to get working.

Most of my documentation is generated by tut. Some of that tut documentation references the current version of the project, which I'd love to get automatically - ideally, through PreprocessPlugin, with a simple @VERSION@.

The problem is that PreprocessPlugin, as far as I understand, has a single source directory, and doesn't support a "managed source" directory in which I could redirect the tut output.

ideally, I'd love to be able to:
  • compile my tut documentation to target/scala-2.12/src_managed/site/preprocess/_tut, or something like that
  • run PreprocessPlugin on ./src/site-preprocess and target/scala-2.12/src_managed/site/preprocess/
is there maybe already something working out the box that I missed? If not, would there be any interest in the feature I mention above, or something like it?
Nicolas Rinaudo
@nrinaudo
looking at PreprocessPlugin's source code, it looks straightforward enough to implement (although I've learned to mistrust that feeling when dealing with SBT plugins)
Simeon H.K. Fitch
@metasim
@nrinaudo For solving the tut side fo the problem, have you tried setting (siteSourceDirectory in Preprocess) := (target in Tut).value?
To run it over two source directories, I'm guessing there's work to do with a new Config, derived from the Preprocess config, but I'm not quite sure how the details would play out.
Nicolas Rinaudo
@nrinaudo
@metasim that's what I ended up doing, yes, but it had the unfortunate (but acceptable) side effect of forcing me to put some files that didn't need to be processed by tut but did need to be preprocessed by sbt-site in the tut source directory
Simeon H.K. Fitch
@metasim
Yeh, that's what I've been doing recently.
Nicolas Rinaudo
@nrinaudo
which is why I feel having a managedSiteSourceDirectory in Preprocess setting, or something to that effect, would be a little cleaner
Simeon H.K. Fitch
@metasim
I just noticed how long ago you posted the question. Sorry for the long delay.
Nicolas Rinaudo
@nrinaudo
no worries, I completely understand
Simeon H.K. Fitch
@metasim
I don't work on this plugin much any more.
@jonas gets all the credit for the recent improvements.
BTW, did you notice the new passthroughmode in tut?
Nicolas Rinaudo
@nrinaudo
you'll get no criticism for me, I'm having a hard enough time maintaining my own OSS projects
I had not. It sounds cool, but not sure about when I'd use it. Do you have a use case?
Simeon H.K. Fitch
@metasim
If you want to have your code generate markdown (my use case: tables).
Nicolas Rinaudo
@nrinaudo
that's almost out of scope for tut though isn't it? it's not a tutorial generator but a Scala preprocessor for Markdown :)
Simeon H.K. Fitch
@metasim
I guess, but in my case I want to be able to have the tables here (generated by Spark) rendered as HTML tables. It's still for the purpose of a tutorial, but better output.
Nicolas Rinaudo
@nrinaudo
you mean to get something more HTML-y than what you linked? Because I quite like that ASCII feel there :)
Simeon H.K. Fitch
@metasim
:-)
Fair point.
My main use case is actually some internal docs colleagues wanted where it makes more sense.
Nicolas Rinaudo
@nrinaudo
the problem I'd have with that is that it sounds like you wouldn't be showing both the code and its output. So it'd either be magical output that you don't really know how to get, or code and output that might end up out of synch
Simeon H.K. Fitch
@metasim
Depends on the target audience. I'm working primariuly with data scientists, trying to hand hold them using Scala, and they care more about the readability of the data than nuances of code execution (for better or worse).
I'm using tut more like they would use knitr.
Nicolas Rinaudo
@nrinaudo
ah, I see. Yeah, not quite the intended use case, but it's nice that you can make it fit
kerr
@hepin1989
[IJ]sbt:PragmaticScala> ghpagesPushSite
[error] fatal: not a git repository (or any of the parent directories): .git
[error] Nonzero exit code (128) running git.
[error] (ghpagesUpdatedRepository) Nonzero exit code (128) running git.
[error] Total time: 5 s, completed 2018-5-20 2:36:52
Nicolas Rinaudo
@nrinaudo
is there some documentation for how to write your own site generator?
more specifically, in the output of a task that generates content, what precisely goes in the Seq[(File, String)] ?
I'm assuming it's a list of generated files, where File is the path to the actual file, but what's the String? relative path to the file from the target directory?
Jonas Fonseca
@jonas
@nrinaudo Yes, (File, String) maps a file to a relative path. sbt has helpers for globbing these mappings from a directory.
Enno Runne
@ennru
sbt-site 1.3.3 and sbt-site 1.4.0 (sbt >1.1.6 only) are now available https://github.com/sbt/sbt-site/releases
Hanns Holger Rutz
@Sciss
Hey there. Moving from paradox to sbt-site - I can't figure out how to continuously render, like what's the equivalent of sbt ~paradox; sbt ~previewSite doesn't seem to cut it, it just renders once and then waits forever till I press ctrl-C.
ah, found it: previewAuto, just very slow as it seems to recompile my unidoc sources :0/
Miles Sabin
@milessabin

Hi folks. I'm having a small issue with sbt-site configured with a submodule for the site. The submodule is named docs. makeSite and previewSite both do the right thing, whether run from the sbt repl with a module prefix (docs / makeSite, docs / previewSite) or without a module prefix following project docs. However, previewAuto only works when run without prefix when changed to the docs project. If I run it with a prefix (docs / previewAuto) it blows up with an NPE),

sbt:gsp-graphql> docs / previewAuto
[error] stack trace is suppressed; run last docs / previewAuto for the full output
[error] (docs / previewAuto) java.lang.NullPointerException
[error] Total time: 0 s, completed 11-Dec-2019 13:04:58
sbt:gsp-graphql> last docs / previewAuto
[error] java.lang.NullPointerException
[error]         at scala.collection.mutable.ArrayOps$ofRef$.newBuilder$extension(ArrayOps.scala:202)
[error]         at scala.collection.mutable.ArrayOps$ofRef.newBuilder(ArrayOps.scala:198)
[error]         at scala.collection.TraversableLike.filterImpl(TraversableLike.scala:254)
[error]         at scala.collection.TraversableLike.filterImpl$(TraversableLike.scala:249)
[error]         at scala.collection.mutable.ArrayOps$ofRef.filterImpl(ArrayOps.scala:198)
[error]         at scala.collection.TraversableLike.filter(TraversableLike.scala:347)
[error]         at scala.collection.TraversableLike.filter$(TraversableLike.scala:347)
[error]         at scala.collection.mutable.ArrayOps$ofRef.filter(ArrayOps.scala:198)
[error]         at com.typesafe.sbt.site.Preview$.startPageURL(preview.scala:45)
[error]         at com.typesafe.sbt.site.Preview$.apply(preview.scala:17)
[error]         at com.typesafe.sbt.site.SitePreviewPlugin$.$anonfun$projectSettings$4(SitePreviewPlugin.scala:49)
[error]         at com.typesafe.sbt.site.SitePreviewPlugin$.$anonfun$projectSettings$4$adapted(SitePreviewPlugin.scala:44)
[error]         at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error]         at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error]         at sbt.std.Transform$$anon$4.work(Transform.scala:67)
[error]         at sbt.Execute.$anonfun$submit$2(Execute.scala:281)
[error]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19)
[error]         at sbt.Execute.work(Execute.scala:290)
[error]         at sbt.Execute.$anonfun$submit$1(Execute.scala:281)
[error]         at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[error]         at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[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] (docs / previewAuto) java.lang.NullPointerException
sbt:gsp-graphql>

It's not a showstopper, but I'd really like docs / previewAuto to work ... does anyone have any ideas what the problem might be?

This is sbt 1.3.4, sbt-site 1.4.0 and a minimal config,
lazy val docs = project
  .in(file("docs"))
  .enablePlugins(ParadoxSitePlugin)
  .settings(
    paradoxTheme         := Some(builtinParadoxTheme("generic")),
    previewLaunchBrowser := false
  )
Miles Sabin
@milessabin
I tracked down a workaround here: https://github.com/sbt/sbt-site/issues/68#issuecomment-309202622 ie. add makeSite := { (makeSite in docs).value } to the root project.
Is anyone else seeing this?
Miles Sabin
@milessabin
Issue created here: sbt/sbt-site#158.
Enno Runne
@ennru
Thank you for digging into this annoyance.
Miles Sabin
@milessabin
Unfortunately, even though this fixes the NPE and the site launches, it doesn't appear to detect changes ... any ideas?
Enno Runne
@ennru
Detect changes as in ~?
Miles Sabin
@milessabin
As in previewAuto ... I was under the impression that it monitored for source changes and rebuilt the site automagically. Otherwise what would be the difference between it and previewSite?
Enno Runne
@ennru
Yes, the intention for it to behave like what you'd expect from ~previewSite.
You're saying that does not work via sbt aggregation? But does when specifying the subproject explicitly?
Miles Sabin
@milessabin
It only updates in response to source changes if run unprefixed from the submodule project.
If I run it from the root project the site launches, but doesn't update.
Gabriel Volpe
@gvolpe
Hi, is it possible to publish a site to GH pages by using the GITHUB_TOKEN instead of SSH keys? Trying to integrate it with GH actions.
kerr
@hepin1989