The wiki repository has a workflow that will be triggered when any push is made to the repository or whenever the user interface issues a new release. Every build, all pages are deleted and re-created. The workflow will cache the user interface under the
directory if there are any changes. This cache allows the build process to run offline.
The workflow can be configured to update the
package.json files by editing the
Install node command, just as if you were running this from a local repo.
DO NOT UPDATE OR PUSH THESE FILES UNLESS YOU DISCUSS IT WITH THE OTHER ADMINISTRATORS FIRST!
supplemental-ui folder holds the content for Anotra search, the header and footer for the ui. Edit these as needed in the wiki repository, but do not edit these same files on the
Technically, the entire ui can be configured from the wiki repo.
The source structure is now modularized.
ROOT - holds content that introduces new users to the jMonkyEngine, installing and features.
core - this is the main module for any content that is specific to an existing jMonkeyEngine class. It maintains similar directories as are found in the jMonkeyEngine repository.
networking - holds content specific to jMonkeyEngine networking.
physics - holds content specific to jMonkeyEngine physics.
tutorials - holds any content that is not specific to any jMonkeyEngine class, may be a generalized concept, may give direction on how to use the engine, or an article of some type about an engine feature.
sdk - sdk content only. This module may be moved to the sdk repository in the future.
contributions - existing user project pages. This is a deprecated module and will be removed in the near furture. Do not add new content to this module.
You can decide if a page belongs in the core module by asking yourself a simple question.
Does the page explain an existing jMonkeyEngine class (excluding physics and networking) found in the jMonkeyEngine repository, without using an external application?
If yes, then it belongs, otherwise it needs to go someplace else.
There is a workflow that can be used to check for broken links.
To use it, simply create a repository, paste a copy of the workflow into the
directory. Before commiting for the first time, set the repo url to point to the wiki.
If there are any errors, a
unresolved.md file will be committed to your repository under the
checked-links directory. You may need to issue a pull request after a push because of this. The typical workflow consists of fixing reported broken links, deleting all
.md files and pushing to the repo. Then issue a pull request to see if there are any remaining problems. These files will only be built if there are errors.
If there are no files in the
link-checker directory and you need to run a check, just create any new file in the
link-checker directory and push it.
The reason for two files is that the
peter-evans/link-checker@v1 action is not capable of reading relative links properly. This is the only action that is available currently. However, we are in luck in that the Anotora build will set a class on any relative link that fails named
class="page unresolved". We can then use a grep command to parse the gh-pages branch and find any file with this class and write it to file.
This is an example of the output for a broken relative link.
tutorials/beginner/hello_collision.html:1289:<p>For a detailed description of the separate jar files see <a href="#getting-started/jme3_source_structure.adoc#structure-of-jmonkeyengine3-jars" class="page unresolved">this list</a>.</p>
This gives you the file name:
and the name of the broken link to search for in the file:
All broken links start with a # sign. In this instance, we have an inter document link thats broken as there are two pound signs.
peterevans action will locate all broken image and web urls. There is a problem though that prevents its full use, which is running this on a schedule and automatically opening issues. When Antora builds a site, it will build links from the “nav-menu” and “Table of Contents” into every page. This will lead to
Too Many Requests (HTTP error 429) errors. The easiest way to get around this would be to filter the href attribute class for the
nav-link class, since we know these links are good, and skip them. This is currently not possible using the
petereveans action. To work around it, just search the
file or directory errors.
wiki-ui repository has two workflows. A workflow that will build on any push (main.yml), and one that builds on pushing a tag (release.yml). If you push any tag to the master branch, a release will be created, triggering the wiki build, thereby updating the wiki cache and user interface for the wiki.
This will allow you to make changes to the ui without triggering a build unless you are ready.
The user interface uses standard html in its templates so editing should be familiar to anyone who knows html.
The wiki uses branches for versioning. The current branch being used for the jMonkeyEngine is always the master branch of the wiki. This means you use the previous branch of the jMonkeyEngine for the new versioned branch name. If the current wiki version is targeting 3.3 and you are creating a new version, then the new version branch would be v3.3. Branch version names should only target major/minor releases, not the patch of a version.
When it’s time to cut a new version for the wiki, the process is as follows.
A component module is a module that has an
We do not want the Antora cache to be versioned so you need to first remove the cache from the
Commit Packagescommand in the main.yml workflow, located in the
# Commits these files to root if and only if there are changes. add: "package-lock.json package.json ./.cache/antora/*"
Next, delete the
Stage, commit and push your changes to the repository.
Create a new branch that matches the current version of the wiki. If master is currently targeting 3.2 for example, that would mean the branch name would be v3.2.
Push the branch to the repository.
masterbranch, edit these files:
Add the newly created branch to the
branches:array in wiki-playbook.yml.wiki-playbook.yml
content: sources: - url: https://github.com/jMonkeyEngine/wiki.git branches: [HEAD, v3.2]
Increment the version of any antora.yml file. At the time of this writing, there were two:The docs antora.yml
name: docs title: JME version: '3.3'
andThe docs-wiki antora.yml
name: docs-wiki title: Wiki Contribution version: '3.3'
The version value is enclosed in a set of single quote marks (') because it starts with a number. As was mentioned earlier, the versioning is controlled by the antora.yml file, not the playbook, so they do not have to match.
Edit any links found in the
README.adoc, located in the root of the repository, that are versioned, so they match the version value you just set in the
./.cache/antora/*back to the
Commit Packagescommand to rebuild the cache.
Stage, commit and push the changes to the repository.
Things to know about versions and component modules.
If a version isn’t specified in the target page ID (xref:email@example.com[link text]), and the target and current pages belong to a different docs components, Antora will use the latest version of the target component to complete the page ID.
At the time of this writing, we have two links in the
docs module (documentation.adoc page) that link to the
docs-wiki module and one that points from the
docs-wiki module to the
docs module license.
Since this is a wiki module, we would want to point to the most current content so not versioning them is the best approach.