io.github.quafadas.millSite
Members list
Type members
Classlikes
The result of converting a single notebook.
The result of converting a single notebook.
Value parameters
- assets
-
extracted images, as paths relative to the notebook's folder paired with their content
- markdown
-
the page content, as Markdown for Laika
- skippedMimeTypes
-
output MIME types present in the notebook that have no renderer, so were left out of the page
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
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 Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Moduletrait ModuleApitrait Wrapperclass BaseClasstrait Cachertrait Cacherclass Objecttrait Matchableclass AnyShow all
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 ScalaModuletrait ScalaModuleApitrait ScalaModuleBasetrait JavaModuletrait JavaModuleApitrait JdkCommandsModuletrait AssemblyModuletrait SemanticDbJavaModuletrait SemanticDbJavaModuleApitrait OfflineSupportModuletrait GenIdeaModuletrait GenIdeaModuleApitrait RunModuletrait RunModuleApitrait DefaultTaskModuletrait JavaModuleBasetrait BspModuletrait BspModuleApitrait WithJvmWorkerModuletrait JavaHomeModuletrait CoursierModuletrait Moduletrait ModuleApitrait Wrapperclass BaseClasstrait Cachertrait Cacherclass Objecttrait Matchableclass AnyShow all
Converts Jupyter notebooks (nbformat 4) to Markdown pages, rendering the outputs already stored in the notebook. Like GitHub, nothing is executed.
Converts Jupyter notebooks (nbformat 4) to Markdown pages, rendering the outputs already stored in the notebook. Like GitHub, nothing is executed.
==Laika notes== Findings from probing Laika 1.3's Markdown parser, which shape the output below:
- Laika does not follow CommonMark for HTML blocks. It parses a block from an opening tag to its matching closing tag, so blank lines inside the block are fine, and
andsurvive verbatim. - Markdown nested inside an HTML block is ''not'' parsed. A fenced code block inside `
` or `` is emitted as literal backticks, so we can't wrap fences in HTML.
- The
@:style(...)directive can put classes on Markdown blocks, but a line reading@:@inside the body closes the directive early, and directives don't nest. Arbitrary output text is therefore emitted as escaped `
`
HTML rather than as a fenced block inside a directive.
- `${...}` and `@:` are taken literally inside code fences and raw HTML blocks. In Markdown prose they are Laika
substitutions and directives, exactly as in any other page on the site.
Hidden inputs use the `@:nbDetails` directive, registered by [[NotebookDirectives]], so the code keeps its syntax
highlighting.
Vega, Vega-Lite and Plotly outputs become a `
` plus an inline `` that draws into it. The libraries are
loaded from a CDN, at the versions pinned in [[Versions]], once per page and only on pages that need them.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
NotebookConverter.type
Laika directives used by pages converted from notebooks.
Laika directives used by pages converted from notebooks.
@:nbDetails(summary) ... @:@ wraps its body in a collapsed `` element. Unlike raw HTML, the body is still parsed as Markdown, so code inside keeps its syntax highlighting.
Attributes
- Supertypes
-
trait DirectiveRegistrytrait ExtensionBundleclass Objecttrait Matchableclass Any
- Self type
-
NotebookDirectives.type
Options controlling how Jupyter notebooks (.ipynb) are rendered into site pages.
Options controlling how Jupyter notebooks (.ipynb) are rendered into site pages.
Value parameters
- fallbackLanguage
-
language used for code fences when the notebook declares none in its metadata
- keepSource
-
keep the
.ipynbfile in the generated site and add a "Download notebook" link at the top of the page - maxOutputLines
-
text outputs (streams, errors, plain text results) longer than this are truncated, with a trailing
… (truncated)line. Zero or less disables truncation. - showPrompts
-
prefix each code cell with an
In [n]:execution prompt
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
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.mdfiles - 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 ScalaJSModuletrait ScalaJSModuleApitrait ScalaModuletrait ScalaModuleApitrait ScalaModuleBasetrait JavaModuletrait JavaModuleApitrait JdkCommandsModuletrait AssemblyModuletrait SemanticDbJavaModuletrait SemanticDbJavaModuleApitrait OfflineSupportModuletrait GenIdeaModuletrait GenIdeaModuleApitrait RunModuletrait RunModuleApitrait DefaultTaskModuletrait JavaModuleBasetrait BspModuletrait BspModuleApitrait WithJvmWorkerModuletrait JavaHomeModuletrait CoursierModuletrait Moduletrait ModuleApitrait Wrapperclass BaseClasstrait Cachertrait Cacherclass Objecttrait Matchableclass AnyShow all
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 sitemill 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 Moduletrait ModuleApitrait Wrapperclass BaseClasstrait Cachertrait Cacherclass Objecttrait Matchableclass AnyShow all