= jMonkeyEngine Documentation

image:https://github.com/jMonkeyEngine/wiki/workflows/Build%20Docs/badge.svg[Status Badge, 175, 25]

see link:https://wiki.jmonkeyengine.org/docs/[https://wiki.jmonkeyengine.org/]

The project to store, edit, and generate the documentation of http://jmonkeyengine.org[jMonkeyEngine].

The documentation `docs/modules/ROOT/pages` is editable :

* Online via github (Edit link located on the top navbar of the Wiki + Pull Request)
* Offline with the Atom editor, which includes a built in previewer and code editor. see link:https://wiki.jmonkeyengine.org/docs/wiki/atom_editor.html[Atom Editor for Wiki Editing],
* Any text editor and browser program of your choice.
* Setting up your own local Node.js environment.

.Prerequisites
.  Have a link:https://github.com/[GitHub account].
.  Optional: Are a Wiki project member.

If you are not a member, you can fork the repository into your GitHub account and issue pull requests via github.

To fork the Wiki repository into your GitHub Account:

*  In the menu at the top of the docs.jmonkeyengine.org page, select the *Fork* button.

The syntax is asciidoctor:

*  link:http://asciidoctor.org/docs/asciidoc-syntax-quick-reference/[Asciidoc Syntax Quick Reference]
*  link:http://asciidoctor.org/docs/user-manual/[Asciidoctor User Manual]

An easy to use primer for GitHub commands can be found here:

*  link:http://rogerdudler.github.io/git-guide/[git - the simple guide]


== Contribute

There are a few simple rules to follow when contributing.

. It's not required but it's a good idea to give a heads up you made a P/R on the link:https://hub.jmonkeyengine.org/[jMonkeyEngine Forum] under the `Documentation` topic.
. When adding documents, make sure to always complete the header of your document first.
. The docs are modular so you can create your own Antora site playbook and module and it can be included in the wiki and maintained by you. +
See: link:https://docs.antora.org/antora/2.3/[Antora Docs]. +
You can create modules and submit them here also.

The wiki is an Antora documentation site. It is recommended that you read at least these paragraphs to inform yourself on how to build pages and submit them for review to the wiki.

* link:https://wiki.jmonkeyengine.org/docs/wiki/atom_editor.html#source-structure[Source Structure]
* link:https://wiki.jmonkeyengine.org/docs/wiki/atom_editor.html#updating-local-wiki-copies[Updating Local Wiki Copies]
* link:https://wiki.jmonkeyengine.org/docs/wiki/atom_editor.html#pushing-changes[Pushing Changes]
* link:https://wiki.jmonkeyengine.org/docs/wiki/atom_editor.html#creating-pages[Creating Pages]

== Build & Preview

To set up the Antora environment, you'll need Nodejs (tested with node 12).

From your local wiki directory.

Run:
```
npm install
npm run buildDocs
```

This will install the needed dependencies and run the static site generator. The documentation will be output to the directory `build/site`.

To preview, navigate to the `build/site` directory and open the index.html file in your browser.

See: https://docs.antora.org/antora/2.3/preview-site/
