I had the same question and I found this page while searching for an answer. Below I worked for me. Note: you need to install Ruby and Python. See the instructions in this Readme in the Prerequisites section.
git clone https:
Optionally, change the branches if you want documentation for a specific version of Spark, for example I wanted Scala docs for Spark 1.6
git branch -a git checkout remotes/origin/branch-1.6
cd to docs directory
cd docs
Run jekyll build - see above read for parameters
jekyll build
Optononym move API documents somewhere else
mv <path/to/spark>/docs/api <other/location/
Note. The pre-built Spark tar file does not seem to include a document directory for some reason.
source share