Skip to content

Instantly share code, notes, and snippets.

Last active Jan 18, 2018
What would you like to do?
Generate Swift docs on Linux with Jazzy and SourceKitten

Here are Commandant's docs built on Linux with Jazzy and SourceKitten:

The rough steps are:

  1. Have and Swift 3 available.
  2. Install the jazzy ruby gem.
  3. Build SourceKitten.
  4. Build Swift Package Manager module.
  5. Generate JSON docs for SwiftPM module using SourceKitten.
  6. Generate HTML docs using jazzy and JSON from step 5.
$ docker run -it norionomura/sourcekit:301 bash
> $ apt-get update && apt-get install -y git ruby2.0 ruby2.0-dev make gcc libsqlite3-dev
> $ gem2.0 install jazzy
> $ git clone
> $ cd SourceKitten
> $ swift build
> $ .build/debug/sourcekitten doc --spm-module Commandant > commandant.json
> $ jazzy -s commandant.json --readme Packages/Commandant-0.11.3/ --author Carthage --github_url --github-file-prefix --module-version 0.11.3 --module Commandant --root-url
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment