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
publishLocalpublishes locally the core and cache modules, so that they can be later picked by mdoc,postProcessruns mdoc, then docusaurus viayarn run buildfromdoc/website, then post-processes the output of docusaurus (underdoc/website/build- this mostly relativizes links),httpServerBgrunsnpx 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
publishLocalpublishes locally the core and cache modules, so that they can be later picked by mdoc,mdocruns mdoc once,yarnStartBgrunsyarn run startfrom thedoc/websitedirectory in the background, which starts docusaurus in watch mode,mdocWatchruns mdoc in watch mode.
yarnStartBg should open a browser window at the website address, that automatically refreshes when the sources change.