tree: ca9a852aa49a9beb3392668d29f87a6243e5079d
  1. assets/
  2. contributing/
  3. extensions/
  4. install/
  5. rules/
  6. faq.md
  7. index.md
  8. readme.md
docs/readme.md

Build & test documentation on local machine

The documentation of ktlint is served with mkdocs-material. For full documentation visit mkdocs.org.

To build and test documentation on your local development machine, follow steps below:

  • In IntelliJ IDEA
    • Open Preferences
    • Search for JSON Schema mappings
    • Add new schema for url https://squidfunk.github.io/mkdocs-material/schema.json and add file mkdocs.yml for this url.
  • Pull docker image
    $ docker pull squidfunk/mkdocs-material
    
  • Start mkdocs server from root of project (e.g. from same directory where file mkdocs.yml is located)
    docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material
    
  • Visit page http://0.0.0.0:8000/ in your browser.
  • Edit the documentation and explicitly save the file. The mkdocs server refreshes its cached and the current page in the browser is automatically refreshed.