To edit the documentation:
-
Learn about the general repository structure in the Repository structure HTML section.
-
Read the writing and markup conventions summary in the Conventions and style guidelines section.
-
Ensure that you log an issue with the details of the problem in the Documentation Repository Issue Tracker for context and assign it to yourself.
-
Clone the documentation repository and make the relevant changes in a branch named after the issue you are working on.
-
Locally build and test the changes. For details on the instructions and tools to do this, see Locally building the documentation.
-
After the local builds are successful, commit your changes and create a PR for the fixes. In the assignee field, select one of the writers to do a quick review before merging your changes.
-
For each push to the master branch and each PR, a preview build of the documentation is created and available at https://docs.prod-preview.openshift.io/. Build status: . The creator of the PR and reviewers can use this build for testing, which is why it is essential to test your changes locally before creating the PR.
-
When reviewed, and after any changes necessary are complete, the PR is merged into the documentation.
To get started quickly, we recommend reviewing the following conventions that are relevant for this documentation suite:
- For instructions, state the location, then action and subject. For example:
- Incorrect: Click OK in the XYZ tab to continue.
- Correct: In the XYZ tab, click OK to continue.
- Use gerunds in titles when possible. For example:
- Incorrect: 1.1 Create a new project
- Correct: 1.1 Creating a new project
- All titles should be in sentence case. Exceptions for words that are proper nouns. For example:
- Incorrect: 1.2 Configuring Your Che Workspace
- Correct: 1.2 Configuring your Che workspace
For a quick primer about the Asciidoc conventions, see the Red Hat Asciidoc Markup conventions document.
When naming branches, refer to the appropriate GitHub issues as follows:
-
Use the prefix i1234 to indicate the issue number.
-
After a hyphen, indicate which repository the issue belongs to (either the fabric8 repository or the openshift.io repository) using f8 or io respectively.
-
After a hyphen, add a phrase (without spaces and in lowercase) that broadly summarizes the issue.
As an example, the branch name for #249 would be i249-f8-branchnaming.
For comprehensive references for documentation conventions, see the following:
- The IBM Style Guide. A subset of this guide is available here.
After making changes to the documentation, you can locally build and test the changes.
After making changes, run the validate script to test the asciidoc markup used in this repository.
- Ensure that
asciidoctor
andxmllint
are installed on your machine. - Run the following script:
$ scripts/validate_guides.sh
After validating the documentation, you can locally build the docs in one of three ways:
1) Build using AsciiDoctor
To build a specific guide:
- Navigate to the target guide's folder:
$ cd docs/<guide>/
- Run the build command:
$ asciidoctor --attribute imagesdir=../../images master.adoc
- View the built guide in a browser:
$ <www-browser-of-choice> master.html
2) Build using a script
- To build all the guides, run the following script:
$ scripts/build_guides.sh
- View the results of the build in a browser:
$ <www-browser-of-choice> html/*.html
HTML versions are built into the html/
directory.
3) Build using containers
This method requires the docker
daemon running on your machine.
- To build the whole docs site, including the landing page, to test the automated building process, run:
$ export CICO_LOCAL=local
$ sudo ./cico_build_deploy.sh
- After a successful build, preview the documentation on localhost:
$ <www-browser-of-choice> http://127.0.0.1:2015/
Use the following commands to deploy the documentation on OpenShift:
$ export DOCS_VERSION=$(curl -L http://central.maven.org/maven2/io/fabric8/apps/fabric8-online-docs-app/maven-metadata.xml | grep '<latest' | cut -f2 -d">" | cut -f1 -d"<")
$ oc apply -f http://central.maven.org/maven2/io/fabric8/apps/fabric8-online-docs-app/$DOCS_VERSION/fabric8-online-docs-app-$DOCS_VERSION-openshift.yml