I need to link to sources on github from my scaladoc. I build those docs with the sbt’s doc task.
There are two problems – first, I do not like creating several nested empty directories for my .scala files, so I usually pack them all in one – like src/main/scala/org.rogach.scallop instead of src/main/scala/org/rogach/scallop. Is there a way to make links to docs work without splitting that directory?
Second, when I put this line in my build.sbt:
scalacOptions in (Compile, doc) ++=
Opts.doc.sourceUrl("https://raw.github.com/Rogach/scallop/master/src/main/scala/")
docs contain links to sources, but all those links just point to the source root url, not files themselves. What am I doing wrong?
From the output of
scaladoc help:(Yes that is the euro symbol.)
Something like the following should work as an argument to sourceUrl if all of your sources are defined in a package: