Skip to main content
Version: 1.1.0-M10

Website

The website relies on docusaurus and mdoc. Its sources are available under doc/docs (page content, in Markdown) and doc/website (docusaurus configuration mostly).

Some of its logic is handled via the mill build tool, even though coursier itself is still built via sbt.

Setup​

mill​

Ensure mill 0.3.5 is installed. Alternatively, fetch it via

$ curl -Lo mill https://github.com/lihaoyi/mill/releases/download/0.3.5/0.3.5
$ chmod +x mill

Then run ./mill rather than just mill below.

yarn / npm / npx​

The website relies on yarn / npm / npx to fetch and run docusaurus. Ensure these are available on your PATH.

Batch mode​

To generate the website once, run

$ mill -i all doc.publishLocal doc.docusaurus.postProcess doc.docusaurus.httpServerBg
  • publishLocal publishes locally the core and cache modules, so that they can be later picked by mdoc,
  • postProcess runs mdoc, then docusaurus via yarn run build from doc/website, then post-processes the output of docusaurus (under doc/website/build - this mostly relativizes links),
  • httpServerBg runs npx http-server doc/website/build/coursier, which starts a website to browse the generated documentation (its address should be printed in the console).

Watch mode​

To run the website while watching its sources (under doc/docs), run

$ mill -i all doc.publishLocal doc.docusaurus.yarnStartBg doc.mdoc.mdocWatch
  • publishLocal publishes locally the core and cache modules, so that they can be later picked by mdoc,
  • mdoc runs mdoc once,
  • yarnStartBg runs yarn run start from the doc/website directory in the background, which starts docusaurus in watch mode,
  • mdocWatch runs mdoc in watch mode.

yarnStartBg should open a browser window at the website address, that automatically refreshes when the sources change.