Thank you, I used an adaptation of this, which I hope can help others, especially in multi-module projects:
Firstly, unidoc at https://github.com/sbt/sbt-unidoc will merge your skydiver from multi-module projects into one place, which is usually what you want, then in build.sbt:
lazy val copyDocAssetsTask = taskKey[Unit]("Copy unidoc resources") copyDocAssetsTask := { println("Copying unidoc resources") val sourceDir = file("src/main/doc-resources") val targetDir = (target in (Compile, doc)).value.getParentFile println(s"from ${sourceDir.getAbsolutePath} to ${targetDir.getAbsolutePath}") IO.copyDirectory(sourceDir, new java.io.File(targetDir, "unidoc")) } copyDocAssetsTask := (copyDocAssetsTask triggeredBy (unidoc in Compile)).value
then place your documents under src/main/doc-resources in the root project, in subdirectories following your package structure, for the path to your class using scaladoc to include the diagram (this just eliminates the need to bother with the parent directories in the URL address) and insert something like:
<img src="DesignModel.svg" width="98%"/> in your skydock
eg. if this scaladoc was in the class in the com.someone.thing package in any project in an assembly with several modules, the DesignModel.svg file would be included in src/main/doc-resources/com/someone/thing inside the root project.
Dick wall
source share