This is a duplicate of Generate scaladoc for root package, however the Answer does not state where sbt doc
looks for the rootdoc.txt
.
I added
scalacOptions in doc ++= Seq("-doc-root-content", "rootdoc.txt")
to my build.sbt
, but sbt doc
does not seem to scan it. I tried to put it next to the build.sbt
, in src
, src/main
, src/main/scala
I am using sbt 0.12.3
The correct solution seems to be
care of https://github.com/pnerg/sbt-scaladoc-settings-plugin/blob/master/README.md
It saddens me this was so hard to figure out.
you should use an abolute file path:
this will make scaladoc look for rootdoc.txt in the root of the project, aka next to build.sbt
It seems that your arguments are not given to
scaladoc
at all. I cannot figure out why the command line arguments are not passed when scoping todoc
, but it works if you do not scope it todoc
but toCompile
:With
rootdoc.txt
at the root of your project.