Typechecked Snippets

As has been mentioned a couple of times throughout this tutorial, this plugin supports the compilation of Scala code written in markdown files. This process is now being delegated on mdoc.

mdoc

mdoc is the option by default, so no special action is required from your side. See the scalameta site for more information here. Here is some advice for using this in your microsite:

  • Add your markdown files in this path by default: docs/.
  • If you want to place your documents in a different path, just set the sbt property mdocIn := your-path being your-path a SettingKey[File].
  • Mark the snippets that you want to compile, following this convention: ```scala mdoc or any of its modifiers

Migrating from tut to mdoc

If your project is still based on tut, you can migrate it from tut to mdoc can follow this migration guide.

There is also a script that does the replacement for you.