Skip to content

Commit

Permalink
GEODE-1952 Move docs build README; edit build instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Joey McAllister authored and Karen Miller committed Oct 14, 2016
1 parent d573de2 commit a0de4c9
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 59 deletions.
61 changes: 60 additions & 1 deletion geode-book/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,60 @@
For information about writing, editing, building, and publishing the Apache Geode documentation, please view the `README.md` and `CONTRIBUTING.md` files in the `geode-docs` directory.
# Apache Geode End-User Documentation

Apache Geode provides the full source for end-user documentation in markdown format (see `../geode-docs/CONTRIBUTE.md`). The latest check-ins to `incubator-geode/geode-docs` are regularly built and published to http://geode.incubator.apache.org/docs/. Users can build the markdown into an HTML user guide using [Bookbinder](https://github.com/pivotal-cf/bookbinder) and the instructions below.

Bookbinder is a Ruby gem that binds a unified documentation web application from markdown, html, and/or DITA source material. The source material for bookbinder must be stored either in local directories or in GitHub repositories. Bookbinder runs [middleman](http://middlemanapp.com/) to produce a Rackup app that can be deployed locally or as a Web application.

This document contains instructions for building and viewing the Geode documentation locally.

- [Prerequisites](#prerequisites)
- [Bookbinder Usage](#bookbinder-usage)
- [Building the Documentation](#building-the-documentation)

## Prerequisites

Bookbinder requires Ruby version 2.0.0-p195 or higher.

Follow the instructions below to install Bookbinder:

1. Add gem "bookbindery" to your Gemfile.
2. Run `bundle install` to install the dependencies specified in your Gemfile.

## Bookbinder Usage

Bookbinder is meant to be used from within a project called a **book**. The book includes a configuration file that describes which documentation repositories to use as source materials. Bookbinder provides a set of scripts to aggregate those repositories and publish them to various locations.

For Geode, a preconfigured **book** is provided in the directory `geode-book`, which gathers content from the directory `geode-docs`. You can use this configuration to build HTML for Geode on your local system.

The installed `config.yml` file configures the Geode book for building locally. The file configures the local directory for the markdown source files.

## Building the Documentation

1. The GemFile in the `geode-book` directory already defines the `gem "bookbindery"` dependency. Make sure you are in the `geode-book` directory and enter:

```
$ bundle install
```

Note: You will not have to run `bundle install` on subsequent builds.

2. To build the documentation locally using the installed `config.yml` file, enter:

```
$ bundle exec bookbinder bind local
```
Bookbinder converts the markdown source into HTML, which it puts in the `final_app` directory.

3. Navigate to the `geode-book/final_app/` and enter:

```
$ bundle install
```
Note: You will not have to run `bundle install` on subsequent builds.

4. To start the website locally, enter:

```
$ rackup
```

You can now view the local documentation at <http://localhost:9292>.
8 changes: 3 additions & 5 deletions geode-docs/CONTRIBUTE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Apache Geode welcomes your contributions to the community's documentation effort
- [Working with Images and Graphics](#working-with-images-and-graphics)
- [Writing Guidelines](#writing-guidelines)

For instructions on building the documentation locally, see `../geode-book/README.md`.

## Working with Markdown Files

You can edit markdown files in any text editor. For more, read [Daring Fireball's Markdown Syntax page](https://daringfireball.net/projects/markdown/syntax).
Expand All @@ -23,13 +25,9 @@ The Wikipedia page [Comparison of Vector Graphics Editors](http://en.wikipedia.o
The most important advice we can provide for working with the Apache Geode docs is to spend some time becoming familiar with the existing source files and the structure of the project directory. In particular, note the following conventions and tips:

- Top-level subdirectories organize topics into "books": basic_config, configuring, developing, etc.

- Use lowercase characters for all file and directory names. Separate words in filenames with an underscore (`_`) character.

- Use the `.md` file extension for topic files.

- Add new topics to the existing directories by subject type. Only create a new directory if you are starting a new subject or a new book.

- To start a new topic, you can make a copy of an existing file with similar content and edit it.

- Use the appropriate document type for the content you are writing. Create multiple topics if you are writing overview, procedural, and reference content.
- To edit elements in the navigation pane (the "subnav") that appears on the left side of the documentation, navigate to `../geode-book/master_middleman/source/subnavs/geode-subnav.md`.
53 changes: 0 additions & 53 deletions geode-docs/README.md

This file was deleted.

0 comments on commit a0de4c9

Please sign in to comment.