This website is built using Docusaurus.
For simple changes to the documentation, click on the
Edit button at the top
of each page and submit those changes directly on GitHub.
Running the site locally
For running the website locally, you'll need:
In case you want to contribute substantial structural changes to the website, we suggest to read Docusaurus' documentation first.
In addition to Docusaurus, we preprocess the markdown files using:
- mdoc, to format Scala code fences by different configuration and retrieve default values.
The first step is then to preprocess the markdown files. You can do it with:
sbt > ~docs/run -w
In a separate terminal window, you can now build and launch the website using these commands:
cd website yarn install # only the first time, to install the dependencies yarn start
Now visit http://localhost:3000/scalafmt/ and you should see a local version of the website.
Adding a new page
Whenever you add a new markdown page to the documentation, you'll have to manually include it in the side menu.
You can do this by editing the
website/sidebars.json file. The name to use is
id specified in the page metadata (see the existing pages for an example).