This repo is for Tile Developer Guide content only. See the Tile Developer Guide Book Repo for the book that publishes this content.
Note: Provide instructions in your PRs to indicate which branches you want Docs to apply your commits to.
| Branch name | Use for… |
|---|---|
| master | https://docs-pcf-staging.cfapps.io/tiledev/2-3/ This is the "edge" build. |
| 2.2 | v2.2 publishes to https://docs-pcf-staging.cfapps.io/tiledev/2-2/ and https://docs.pivotal.io/tiledev/2-2 |
| 2.1 | v2.1 publishes to https://docs-pcf-staging.cfapps.io/tiledev/2-1/ and https://docs.pivotal.io/tiledev/2-1 |
| 2.0 | v2.0 publishes to https://docs-pcf-staging.cfapps.io/tiledev/2-0/ and https://docs.pivotal.io/tiledev/2-0 |
| 1.12 | v1.12 publishes to https://docs-pcf-staging.cfapps.io/tiledev/1-12/ and https://docs.pivotal.io/tiledev/1-12 |
This template helps Pivotal development teams prepare documentation for Pivotal Cloud Foundry (PCF) services that appear on Pivotal Network.
Every PCF service has (or should have) documentation on the main Pivotal documentation site, docs.pivotal.io under Pivotal Cloud Foundry Services.
You can use this template to develop documentation for a new PCF service. It includes sections for a Product Snapshot, prerequisites, instructions for installation and use, release notes, license information, and other generally useful and expected documentation.
To begin using this repo to develop your documentation, perform the following steps:
- Clone this repo onto your local machine.
- Work your way through each topic, replacing the placeholders in ALL-CAPS and following the instructions in bold.
- Complete the subnav by replacing the placeholders in ALL-CAPS in the subnav file at
book/master_middleman/source/subnavs/service_subnav.erbin this repo. - View your documentation as a live local site in a browser, by following the steps below in the How To Use Bookbinder To View Your Docs section.
- When you've finished your documentation, push your docs up to the remote and email the PCF Docs Team at [email protected].
Bookbinder is a command-line utility for stitching Markdown docs into a hostable web app. The PCF Docs Team uses Bookbinder to publish our docs site, but you can also use Bookbinder to view a live version of your documentation on your local machine.
Bookbinder draws the content for the site from docs-content, the subnav from docs-book, and various layout configuration and assets from docs-layout.
To use Bookbinder to view your documentation, perform the following steps:
- On your local machine,
cdintodocs-bookin the cloned repo. - Run
bundle installto make sure you have all the necessary gems installed. - Build your documentation site with
bookbinderin one of the two following ways:- Run
bookbinder watchto build an interactive version of the docs and navigate tolocalhost:4567/myservice/in a browser. (It may take a moment for the site to load at first.) This builds a site from your content repo atdocs-content, and then watches that repo to update the site if you make any changes to the repo. - Run
bookbinder bind localto build a Rack web-app of the book. After the bind has completed,cdinto thefinal_appdirectory and runrackup. Then navigate tolocalhost:9292/myservice/in a browser.
- Run
If you are reading this, Pivotal has invited you to a git repo where you can build and edit documentation in the Ruby / Markdown / HTML format that the online publishing tool Bookbinder uses to build Pivotal's documentation.
Here's how to install Bookbinder and build your docs from the repo, starting from scratch, on a Mac OS X machine.
Note: All steps below are implicitly preceded with, "If you haven't already..." You should skip any installation steps that have already contributed to your environment.
In Terminal window:
-
Make and
cdinto a workspace directory.$ mkdir workspace$ cd workspace -
Follow the instructions at
http://brew.shto install brew / homebrew$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" -
Install your own (non-system) ruby.
$ brew install ruby
-
Download and Install git by following the instructions at git-scm.com.
-
Install your own (non-system) bash-completion (optional).
$ brew install git bash-completion -
If you don't already have one, generate a public/private RSA key pair, and save the key to your
~/.sshdirectory.$ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/Users/YOUR-USERID/.ssh/id_rsa): -
Get a Github account.
-
Add your RSA public key to your Github account / profile page.
$ cat ~/.ssh/id_rsa.pub # copy and paste this into Github profile page as new key
-
Install a Ruby manager such as chruby.
$ brew install chruby -
Add your Ruby manager to your
~/.bashrcby appending the following line:source /usr/local/opt/chruby/share/chruby/chruby.sh -
Install the
ruby-installinstaller.$ brew install ruby-install -
Run
ruby-installto install Ruby.$ ruby-install ruby 2.3
-
Install
bundler.$ gem install bundler -
Install bookbinder (the
bookbinderygem).$ gem install bookbindery
-
Clone the docs template repo you will be building from.
$ git clone [email protected]:pivotal-cf-experimental/docs-pcfservices-template -
cdinto thebooksubdirectory of the repo.$ cd docs-partners-template/docs-book -
Run
bundle installto install all book dependencies.$ bundle install -
Run
bookbinder watchto build the book on your machine. If it doesn't succeed, try prepending the command withbundle execso that bookbinder uses local gems instead of global gems.$ bundle exec bookbinder watch -
Browse to
localhost:4567to view the book locally and "watch" any changes that you make to sourcehtml.md.erbfiles. As you make and save changes to the local source files for your site, you will see them in your browser after a slight delay.
After each session of writing or revising your docs source files, commit and push them to your github repo.
Happy documenting!