io.github.quafadas.millSite

Members list

Type members

Classlikes

case class EsmMap(imports: Map[String, String])

JSON representation of ESM import mappings for Mdoc JS processing.

JSON representation of ESM import mappings for Mdoc JS processing.

Value parameters

imports

Map from import prefix to replacement URL/path

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait LaikaModule extends Module

Attributes

Supertypes
trait Module
trait ModuleApi
trait Wrapper
class BaseClass
trait Cacher
trait Cacher
class Object
trait Matchable
class Any
Show all
trait MdocModule extends ScalaModule

A Mill module trait that provides integration with Mdoc for typesafe documentation.

A Mill module trait that provides integration with Mdoc for typesafe documentation.

Mdoc processes Markdown files containing Scala code blocks, compiling and evaluating the code to ensure documentation examples are correct and up-to-date. Code blocks are executed and their output is inserted into the generated Markdown.

==Features==

  • Typesafe documentation with compiled Scala code examples
  • Scala.js support for interactive browser examples via SiteJSModule
  • Incremental processing with in-memory caching for fast rebuilds
  • Site variable substitution for dynamic content
  • Integration with Mill's dependency resolution and classpath management

==Usage== Mix this trait into your Mill build module:

n object docs extends MdocModule { override def scalaVersion = "3.3.1" override def moduleDeps = Seq(myLibrary) }

==File Naming Convention== Files ending in .mdoc.md are processed by Mdoc. Regular .md files are copied as-is to the output directory.

Attributes

See also

SiteJSModule for Scala.js integration

Supertypes
trait ScalaModule
trait ScalaModuleApi
trait ScalaModuleBase
trait JavaModule
trait JavaModuleApi
trait JdkCommandsModule
trait AssemblyModule
trait SemanticDbJavaModule
trait SemanticDbJavaModuleApi
trait OfflineSupportModule
trait GenIdeaModule
trait GenIdeaModuleApi
trait RunModule
trait RunModuleApi
trait DefaultTaskModule
trait JavaModuleBase
trait BspModule
trait BspModuleApi
trait WithJvmWorkerModule
trait JavaHomeModule
trait CoursierModule
trait Module
trait ModuleApi
trait Wrapper
class BaseClass
trait Cacher
trait Cacher
class Object
trait Matchable
class Any
Show all
trait SiteJSModule extends ScalaJSModule

A Mill module trait providing Scala.js integration for Mdoc documentation.

A Mill module trait providing Scala.js integration for Mdoc documentation.

This module enables interactive Scala.js code examples in documentation. When mixed into your build, it configures Mdoc to compile and link Scala.js code blocks, producing JavaScript that runs in the browser.

==Features==

  • Compiles Scala.js code blocks in .mdoc.md files
  • ES Module output for modern browser compatibility
  • Import map support for external JavaScript dependencies
  • Automatic scalajs-dom dependency inclusion

==Usage== Override jsSiteModule in your MdocModule to enable Scala.js support:

n object docs extends MdocModule { override val jsSiteModule = new SiteJSModule { override def scalaVersion =
"3.3.1" override def scalaJSVersion = "1.16.0" override def moduleDeps = Seq(myJsLibrary) } } 

Attributes

See also

MdocModule for the parent documentation module

Supertypes
trait ScalaJSModule
trait ScalaJSModuleApi
trait ScalaModule
trait ScalaModuleApi
trait ScalaModuleBase
trait JavaModule
trait JavaModuleApi
trait JdkCommandsModule
trait AssemblyModule
trait SemanticDbJavaModule
trait SemanticDbJavaModuleApi
trait OfflineSupportModule
trait GenIdeaModule
trait GenIdeaModuleApi
trait RunModule
trait RunModuleApi
trait DefaultTaskModule
trait JavaModuleBase
trait BspModule
trait BspModuleApi
trait WithJvmWorkerModule
trait JavaHomeModule
trait CoursierModule
trait Module
trait ModuleApi
trait Wrapper
class BaseClass
trait Cacher
trait Cacher
class Object
trait Matchable
class Any
Show all
trait SiteModule extends Module

The main Mill module trait for generating documentation sites.

The main Mill module trait for generating documentation sites.

SiteModule is the primary entry point for building documentation sites. It orchestrates MdocModule, LaikaModule, and UnidocModule to produce a complete static site with:

  • Typesafe Scala code examples (via Mdoc)
  • Markdown to HTML transformation (via Laika)
  • API documentation (via Unidoc/Scaladoc)
  • Live-reload development server

==Features==

  • Single entry point combining all documentation tools
  • Built-in live-reload server for rapid documentation iteration
  • Site variable substitution for version numbers and links
  • Optional Scala.js support for interactive examples
  • Configurable Helium theme with navigation

==Usage== Mix this trait into your Mill build:

n object site extends SiteModule { override def scalaVersion = "3.3.1" override def unidocDeps = Seq(myLibrary)
override def repoLink = Task("https://github.com/you/repo") } 

==Commands==

  • mill site.siteGen - Generate the complete site
  • mill site.serve - Start live-reload development server

Attributes

See also

MdocModule for Mdoc configuration

LaikaModule for Laika/theme configuration

UnidocModule for API documentation configuration

Supertypes
trait Module
trait ModuleApi
trait Wrapper
class BaseClass
trait Cacher
trait Cacher
class Object
trait Matchable
class Any
Show all

Implicits

Implicits

implicit val ec: ExecutionContext