Skip to content

Commit

Permalink
Update docs/README.md to put all prereqs together.
Browse files Browse the repository at this point in the history
This pull request groups all the prereq requirements into a single section.

cc srowen shivaram

Author: Reynold Xin <[email protected]>

Closes apache#7951 from rxin/readme-docs and squashes the following commits:

ab7ded0 [Reynold Xin] Updated docs/README.md to put all prereqs together.
  • Loading branch information
rxin committed Aug 5, 2015
1 parent d34bac0 commit f7abd6b
Showing 1 changed file with 8 additions and 35 deletions.
43 changes: 8 additions & 35 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ documentation yourself. Why build it yourself? So that you have the docs that co
whichever version of Spark you currently have checked out of revision control.

## Prerequisites
The Spark documenation build uses a number of tools to build HTML docs and API docs in Scala, Python
and R. To get started you can run the following commands
The Spark documentation build uses a number of tools to build HTML docs and API docs in Scala,
Python and R. To get started you can run the following commands

$ sudo gem install jekyll
$ sudo gem install jekyll-redirect-from
$ sudo pip install Pygments
$ sudo pip install sphinx
$ Rscript -e 'install.packages(c("knitr", "devtools"), repos="http://cran.stat.ucla.edu/")'


Expand All @@ -29,17 +30,12 @@ you have checked out or downloaded.
In this directory you will find textfiles formatted using Markdown, with an ".md" suffix. You can
read those text files directly if you want. Start with index.md.

The markdown code can be compiled to HTML using the [Jekyll tool](http://jekyllrb.com).
`Jekyll` and a few dependencies must be installed for this to work. We recommend
installing via the Ruby Gem dependency manager. Since the exact HTML output
varies between versions of Jekyll and its dependencies, we list specific versions here
in some cases:
Execute `jekyll build` from the `docs/` directory to compile the site. Compiling the site with
Jekyll will create a directory called `_site` containing index.html as well as the rest of the
compiled files.

$ sudo gem install jekyll
$ sudo gem install jekyll-redirect-from

Execute `jekyll build` from the `docs/` directory to compile the site. Compiling the site with Jekyll will create a directory
called `_site` containing index.html as well as the rest of the compiled files.
$ cd docs
$ jekyll build

You can modify the default Jekyll build as follows:

Expand All @@ -50,29 +46,6 @@ You can modify the default Jekyll build as follows:
# Build the site with extra features used on the live page
$ PRODUCTION=1 jekyll build

## Pygments

We also use pygments (http://pygments.org) for syntax highlighting in documentation markdown pages,
so you will also need to install that (it requires Python) by running `sudo pip install Pygments`.

To mark a block of code in your markdown to be syntax highlighted by jekyll during the compile
phase, use the following sytax:

{% highlight scala %}
// Your scala code goes here, you can replace scala with many other
// supported languages too.
{% endhighlight %}

## Sphinx

We use Sphinx to generate Python API docs, so you will need to install it by running
`sudo pip install sphinx`.

## knitr, devtools

SparkR documentation is written using `roxygen2` and we use `knitr`, `devtools` to generate
documentation. To install these packages you can run `install.packages(c("knitr", "devtools"))` from a
R console.

## API Docs (Scaladoc, Sphinx, roxygen2)

Expand Down

0 comments on commit f7abd6b

Please sign in to comment.