Improvements to Windup documentation are welcome.
In order to contribute, you will need a GitHub account and to have git
installed on your machine. You can also log a {JiraWindupURL}[Jira issue] to track the changes.
Use the following steps to submit a change to the Windup documentation repository.
-
Fork the windup-documentation GitHub repository.
Click the Fork button in the top right corner of the page.
-
Clone the forked repository locally.
$ git clone [email protected]:YOUR_USERNAME/windup-documentation.git
-
Add the upstream repository.
git remote add -f upstream [email protected]:windup/windup-documentation.git
-
Get the latest changes.
$ git fetch upstream
-
Check out a topic branch.
$ git checkout -b BRANCH_NAME upstream/master
-
Make the desired edits.
The documentation is written in AsciiDoc. Review the AsciiDoc Guidelines and Tips section of this guide before making changes.
-
Build the guides to verify your changes.
-
Navigate to the appropriate guide’s directory and issue the following command. Note that you must have Asciidoctor installed.
$ cd docs/cli-guide/ $ asciidoctor -t -dbook -a toc -o html/cli-guide.html master.adoc
-
View the generated HTML file in a browser.
-
-
Add each new or updated file to git.
$ git add FILE_NAME.adoc
-
Commit the changes locally.
$ git commit -m "My commit message."
-
Push the changes to your forked repository.
$ git push origin HEAD
-
Open a pull request to merge your changes to the master branch.
-
Navigate to your forked repository in a browser: https://github.com/YOUR_USERNAME/windup-documentation.
-
Open a new pull request. Be sure to review the diff before submitting.
-
A member of the Windup documentation team will merge or provide feedback on your request.
-
Navigate to the appropriate guide’s directory and issue the following command. Note that you must have Asciidoctor installed.
$ cd docs/cli-guide/
$ asciidoctor -t -dbook -a toc -o html/cli-guide.html master.adoc
View the generated HTML file in a browser.
The Windup guides are published downstream on the Red Hat Customer Portal.
The following editors make editing and reviewing AsciiDoc files easy.
-
Atom with the
asciidoc-preview
andlanguage-asciidoc
packages. -
Any basic editor, such as gedit, with the Chrome Asciidoctor.js plugin
For a comprehensive reference of AsciiDoc syntax, see the AsciiDoc User Guide.
-
Headings
= Heading Level 1 == Heading Level 2 === Heading Level 3
-
Bold text
*Bold text*
-
Italic text
_Italic text_
-
Monospace text
`Monospace text`
-
Bullets
* Item one * Item two
-
Numbered list
. Step one . Step two
-
Code block
---- System.out.println("Hello"); ----
-
Name the file using only letters, numbers, and dashes, and with an extension of
.adoc
. For example,my-topic.adoc
. -
Add an anchor at the top of the file, using underscores. For example,
[[my_anchor]]
. -
Start each topic with a level one heading. For example,
= My Heading
. -
Add this new topic to the
master.adoc
file using theinclude::
syntax.-
Pass in a
leveloffset=+N
to adjust the heading levels in the included file to be the correct level.
-
= My Guide Title
include::topics/my-topic.adoc[leveloffset=+1]
[[my_anchor]]
= My Heading
Text here.
== My Subsection
Text here.
Use xref
to link to a section within the same guide. You must define an explicit anchor in order to link.
For more information, see xref:section_anchor[This Section].
...
[[section_anchor]]
== This Section
...
Use link
to reference an external URL.
Navigate to the link:https://github.com/windup/windup-documentation[Windup GitHub repository].
The Windup documentation defines several AsciiDoc attributes in the docs/templates/document-attributes.adoc
file. This allows you to define the value one place and then used it repeatedly throughout the guides. An example usage of this is defining the Windup version.
Define an attribute in the document-attributes.adoc
file using the following syntax.
:ProductVersion: 5.0.0.Final