This is an sbt plugin for Socco
Socco is a Scala compiler plugin to generate documentation from Scala source files. It produces HTML documents that display your comments alongside your code. Comments are passed through Markdown, and the Scala code is syntax highlighted, typed and linked to the appropriate API Doc.
Socco is developed by our friends @ Criteo.
Start by installing the sbt plugin in project/plugins.sbt. This plugin requires sbt 1.0.0+
addSbtPlugin("io.regadas" % "sbt-socco" % "0.1.0")
Then in your build.sbt file, simply enable the SbtSoccoPlugin
via an enablePlugins
statement for your project.
enablePlugins(SbtSoccoPlugin)
You can further customize the generated html
documents through with the following settings:
soccoOut
- output directory for the generatedhtml
documents.soccoStyle
- path to a custom stylesheet.soccoHeader
- path to a customhtml
header.soccoFooter
- path to a customhtml
footer.soccoPackage
- List of packages and scaladoc url's. Needs to follow this "$packageName:$scalaDocUrl" pattern.soccoIndex
- Custom task that generates ahtml
toc.soccoOnCompile
- If soccohtml
documents should be generated at compile phase.
If you set soccoOnCompile := false
to compile the examples you need to run:
enableSocco
and then,compile
To understand the supported syntax please check socco repo.