Skip to content

Contributing documentation changes

Weyman Fung edited this page May 1, 2020 · 3 revisions

The official Pivotal UI documentation is the Pivotal UI Styleguide. The code for the styleguide lives in the pivotal-cf/pui-styleguide repo.

All text content and code examples are written in Markdown files that live in the docs directory. To improve/add documentation, you probably only need to edit files in the docs directory.

The preferred ways of contributing documentation changes are as follows:

Making changes directly on GitHub

This is the easiest/fastest way to make changes, but when doing this you will not be able to preview your changes in the styleguide as you're making them (you'll have to rely on GitHub's Markdown preview).

  1. Find the page that you would like to edit in the docs directory.

  2. Click the "Edit this file" button (a pencil icon) and make the changes you'd like to make.

  3. When finished, choose the option to commit the changes to a new branch and start a pull request.

  4. Soon, someone from the Pivotal UI team will review the pull request and either accept the changes or discuss next steps.

Once the pull request is accepted, the change will go through our pipeline. Next time we deploy the styleguide to production, your change will be visible at styleguide.pivotal.io.

Making changes on your computer

If you'd prefer to preview your changes as you're making them, follow these steps.

  1. Clone the styleguide repo to your computer and install dependencies:
git clone https://github.com/pivotal-cf/pui-styleguide.git && cd pui-styleguide && yarn
  1. Create a new branch for your changes:
git checkout -b fix-typo-in-buttons-docs
  1. Start up the styleguide locally:
yarn start
  1. Make the changes you'd like to make in your code editor and commit them.

  2. Push them to your new branch in our repo:

git push -u origin fix-typo-in-buttons-docs
  1. Open a pull request on GitHub to merge your branch into master.

  2. Soon, someone from the Pivotal UI team will review the pull request and either accept the changes or discuss next steps.

Once the pull request is accepted, the change will go through our pipeline. Next time we deploy the styleguide to production, your change will be visible at styleguide.pivotal.io.

Running Units

We use "jest" to run the unit tests. You can either run jest or yarn run test

  • Be aware that the font validator test only works if python2 is your "python" executable.