Juju documentation

How you can contribute!

It's a tough job writing documentation which covers every use case and scenario - mainly because Juju is so versatile it can be used in so many ways. That is why we hope to get plenty of feedback from users to help extend, amend and improve the documentation. It is really easy and you don't have to be the world's best writer. Our grammar goblins will sort out any problems with the words, but your knowledge is very useful to us.

How to write docs!

Contributing to the docs is really easy because it is all written in GitHub flavored Markdown. You will find most of the source documents are very straightforward and human-readable, if you just want to dip in and change a paragraph or add some extra info.

Grab the docs and get to work

The code is available on github.com/juju/docs. Clone it, edit it, and then submit a pull request.

We enforce 80 columns for every text file to keep it readable. Here are instructions for two editors:

Here is a handy Markdown reference) to get you started, and don't forget to reference the GitHub Flavored Markdown reference.

The individual document pages are in the src directory. From there each language is seperated into it's own directory by language code. So for example English is in src/en.

Sections

All the text is organised into sections. These are autogenerated, there is nothing extra you need to do:

# <h1> equivalent
## <h2> equivalent
### <h3> equivalent

Code Blocks

To code block something indent each line with 4 whitespace characters.

Inline code

Use a backtick to inline commands and other literals.

Notes

**Note:** Put your note here

Is rendered like

Note: Put your note here

Adding pages

If you find you need to add a page to the documentation, then you will also need to add it to the navigation, which means altering one file, src/navigation.tpl.

Add the page with the following format:

<li class="sub"><a href="charms-scaling.html">Scaling Services</a></li>;

in the appropriate section. Please make sure you submit a merge proposal with a description of the new page and why it is needed!

Testing or Deploying locally

First you need to generate the docs from the Markdown. In the root directory first get the dependencies and make the docs:

make sysdeps
make

Note: You only need to make sysdeps once, after that you'll have all the dependencies you'll need to build the docs going forward.

The documentation makes use of Javascript for some functionality, so in order to test the docs properly or serve them localyl, you will need to have an http server set up.

On Ubuntu this is easy. Install (if you need to) and start the apache2 web server, then just copy the htmnldocs directory to a convenient location -

sudo cp -R htmldocs /var/www/htmldocs

You can then point your web browser at your local machine (127.0.0.1/htmldocs) to view the files.

Alternatively, you can use Python to start a simple HTTP server on the docs directory. Navigate to the /htmldocs directory of the docs and run the following:

python -m SimpleHTTPServer

Submitting your work

We love it when the community contributes to documentation, here's how to contribute:

And that's it! Someone from the Juju team will review your work and merge it in! Please don't forget to review the page before submission.