Documentation > Developers
Get ready 🔗
You will need the following tools to design your plugin: The first step is to clone the github repository for OpenMOLE :git clone https://gitlab.openmole.org/openmole/openmole.git
In order to generate documentation with scalaTex, openMOLE need some libraries.
Into your recently cloned openmole folder, call these three commands to compile libraries:
git lfs fetch
(cd build-system && sbt publishLocal)
(cd libraries && sbt publishLocal)
Compiling documentation 🔗
You're now ready to compile the actual documentation. Move into the nested openmole folder and run sbt to generate the website:cd openmole
sbt buildSite
The generated site is visible by opening openmole/openmole/bin/org.openmole.site/jvm/target/site/index.html
in your browser !
Adding a new page 🔗
Scalatex file are located into the bin folderbin/org.openmole.site/jvm/src/main/scalatex/openmole
:
cd openmole/openmole/bin/org.openmole.site/jvm/src/main/scalatex/openmole
For this example, we try to add this current page "Documentation Generation" to Developers.
Into your favorite IDE :
- open
/org/openmole/site/Pages.scala
and search thedef developersPages
entry - add this new
compileDocumentation
variable
lazy val compileDocumentation = DocumentationPage.fromScalatex(name = "Documentation generation", content = scalatex.documentation.developers.DocumentationGen)
After that, we add compileDocumentation
to the pageNode
corresponding to the "Developers" entry on the website:
def developersPages = pageNode(developers, Vector(console, pluginDevelopment, extensionAPI, restAPI, documentationGen))
Now, leave the Pages.scala
file and create a new scalatex file documentaionGen.scalatex
into /openmole/community/documentation/developers/
.
We add a new link to the list of pages using:
@li{How to compile and modify the @a("documentation", href := DocumentationPages.documentationGen.file)}