Scalafmt

Scalafmt

  • Docs
  • GitHub

›Contributing

Documentation

  • Installation
  • Configuration
  • Gotchas
  • FAQ / Troubleshooting
  • Known Issues
  • Changelog

Contributing

  • Contributing
  • Contributing to the website
Edit

Contributing to the website

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:

  • yarn (https://yarnpkg.com/lang/en/docs/install-ci/)
  • sbt (https://www.scala-sbt.org/1.0/docs/Setup.html)

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 the id specified in the page metadata (see the existing pages for an example).

← Contributing
  • Running the site locally
  • Adding a new page
Scalafmt
Docs
InstallationConfigurationContributing
Community
Join on DiscordChat on Gitter (defunct)
More
GitHub
Copyright © 2025 Scalafmt