README.adoc 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. = jMonkeyEngine Documentation
  2. image:https://github.com/jMonkeyEngine/wiki/workflows/Build%20Docs/badge.svg[Status Badge, 175, 25]
  3. see link:https://wiki.jmonkeyengine.org/docs/[https://github.com/jMonkeyEngine/wiki]
  4. The project to store, edit, and generate the documentation of http://jmonkeyengine.org[jMonkeyEngine].
  5. The documentation `docs/modules/ROOT/pages` is editable :
  6. * Online via github (Edit link located on the top navbar of the Wiki + Pull Request)
  7. * 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],
  8. * Any text editor and browser program of your choice.
  9. * Setting up your own local Node.js environment.
  10. .Prerequisites
  11. . Have a link:https://github.com/[GitHub account].
  12. . Optional: Are a Wiki project member.
  13. If you are not a member, you can fork the repository into your GitHub account and issue pull requests via github.
  14. To fork the Wiki repository into your GitHub Account:
  15. * In the menu at the top of the docs.jmonkeyengine.org page, select the *Fork* button.
  16. The syntax is asciidoctor:
  17. * link:http://asciidoctor.org/docs/asciidoc-syntax-quick-reference/[Asciidoc Syntax Quick Reference]
  18. * link:http://asciidoctor.org/docs/user-manual/[Asciidoctor User Manual]
  19. An easy to use primer for GitHub commands can be found here:
  20. * link:http://rogerdudler.github.io/git-guide/[git - the simple guide]
  21. == Contribute
  22. There are a few simple rules to follow when contributing.
  23. . 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.
  24. . When adding documents, make sure to always complete the header of your document first.
  25. ** see link:https://wiki.jmonkeyengine.org/docs/wiki/wiki_header.html[Anatomy of a Wiki Header]
  26. . 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].
  27. . You can create modules and submit them here also.
  28. . When linking to other Wiki pages located in the `ROOT` module, always use an "`Inter-Document Cross Reference`" with the format,
  29. ** ++<<path/to/wiki/page#,custom label text>>++
  30. +
  31. --
  32. The `#` sign substitutes for the file extension. This type of link will first look for the `.adoc` file and if not found default to the `.html` version.
  33. The path should be relative to the `pages` folder.
  34. For example: `++<<jme3/requirements#,Software and hardware requirements>>++` +
  35. links to the `requirements.adoc` page, which lives in a sub-folder of `pages` named `jme3`.
  36. See link:http://asciidoctor.org/docs/user-manual/#inter-document-cross-references[http://asciidoctor.org/docs/user-manual/#inter-document-cross-references] for more info.
  37. --
  38. . See link:https://docs.antora.org/antora/2.3/navigation/[Antora Navigation] for creating nav menues and navigation between modules.
  39. . When linking to images stored in the wiki repository, always use an image prefix in front of the file name and square brackets after it with the format,
  40. ** Image on its own line - `image::path/to/image.jpg[image alt text,width=" ",height=" ", align=" "]`
  41. +
  42. --
  43. For example: `++image::jme3/beginner/beginner-assets-models.png[beginner-assets-models.png,320,250,align="center"]++`
  44. * This image is on its own line.
  45. * Is stored in the `jme3/beginner` folder which lives in the `images` folder.
  46. * Is named `beginner-assets-models.png`.
  47. * Has a `alt text` name of `beginner-assets-models.png`.
  48. * Has a width of 320.
  49. * Has a height of 250.
  50. * Is aligned in the center of the page.
  51. --
  52. ** If you want to include an image inline, use the `image:` prefix instead (notice there is only one colon):
  53. +
  54. See link:http://asciidoctor.org/docs/user-manual/#images[http://asciidoctor.org/docs/user-manual/#images] for in depth instructions.
  55. . When linking to the jMonkeyEngine javadocs, use the global attribute `pass:[{link-javadoc}]` in your link path.
  56. +
  57. .Link example
  58. ```
  59. link:{link-javadoc}/com/jme3/app/state/BaseAppState.html[BaseAppState]
  60. ```
  61. ** see link:https://wiki.jmonkeyengine.org/docs/wiki/wiki_header.html[Anatomy of a Wiki Header] for details on how to override this setting.
  62. == Build & Preview
  63. To set up the Antora environment, you'll need Nodejs (tested with node 12).
  64. From your local wiki directory.
  65. Run:
  66. ```
  67. npm install
  68. npm run buildDocs
  69. ```
  70. This will install the needed dependencies and run the static site generator. The documentation will be output to the directory `build/site`.
  71. To preview, navigate to the `build/site` directory and open the index.html file in your browser.
  72. see: https://docs.antora.org/antora/2.3/preview-site/