Suggestion for wiki header

I have a suggestion for attributes being added to the header of .adocs. These are the most used links external to the wiki and if made an attribute and any of these repositories moves its a minor change to update.

:uri-jmonkeyengine: https://github.com/jMonkeyEngine/jmonkeyengine/tree/master/
:img-jmonkeyengine: https://github.com/jMonkeyEngine/jmonkeyengine/raw/master/
:uri-forum: https://hub.jmonkeyengine.org/
:uri-javadoc: http://javadoc.jmonkeyengine.org/

You then use them in images and links with,
{uri-jmonkeyengine}
{img-jmonkeyengine}
{uri-forum}
{uri-javadoc}

Input is appreciated.

edit: added category

1 Like

If we do this it would be easier to update the wiki, assuming the directory structure stays the same. I could also add these attributes and the others that already exist to the README.adoc under contribute (where it says TODO) and it would look something like this:

Proper linking formats:

Prior to creating links, read this short Wiki Links document, then use these linking formats listed when editing or creating links in the wiki.

`<<section-title#,cross reference text>>` - used for cross referencing documents stored in the wiki repsitory
`image::path/to/filename.jpg[]` - used for images stored in the images directory in the repository
`{uri-jmonkeyengine}` - used for linking to files in the jmonkeyengine repository
`{img-jmonkeyengine}` - used for linking to images in the jmonkeyengine repository
`{uri-forum}` - used for linking to jmonkeyengine forum posts
`{uri-javadoc}` - used for linking to javadoc pages

All other offsite links use the typical url format,
`http://www.somewebsite.com/path/to/file.html`

This is what the wiki link document would look like.

When accessing other documents stored in the wiki repository it is called Cross Referencing. The base directory is located here and you format your link like so:

<<section-title#,cross reference text>>

As an example, to reach a document stored in the directory jme3/advanced/ named custom_controls.adoc you format your reference link as follows,

<<jme3/advanced/custom_controls#,Custom Controls>>

Cross referenced images are handled by use of the image:: (block image) or image: (inline image) macro. The images directory is located here and you format your links in the simplest form as follows ,

image::path/to/filename.jpg[]

As an example, to load a YouTube video that has the image stored in the sdk/plugin directory and is named CgFzhkq-MKk.jpg,

image:sdk/plugin/CgFzhkq-MKk.jpg [youtu.be/CgFzhkq-MKk,width="",height="",link="https://youtu.be/CgFzhkq-MKk"]

Links to the jmonkeyengine repository, forum and javadocs are handled by use of an attribute reference:

{uri-jmonkeyengine} - used to link to the jmonkeyengine repository
{img-jmonkeyengine} - used to link to images located in the repository
{uri-forum} - used to link to the jmonkeyengine forum
{uri-javadoc} - used to link to the jmonkeyengine javadocs

The process for linking to the jmonkeyengine repository for instance is as follows:

First, start the link,

link:{uri-

then when at github and with the file selected you hit the “Copy Path” button, then paste it into your document,

link{uri-jmonkeyengine / jme3-examples / src / main / java / jme3test / water / TestSceneWater.java

change the forward slash (/) to the right of jmonkeyengine to a right bracket (}),

link:{uri-jmonkeyengine}jme3-examples/src/main/java/jme3test/water/TestSceneWater.java

attach our text [TestSceneWater.java],

link:{uri-jmonkeyengine}jme3-examples/src/main/java/jme3test/water/TestSceneWater.java[TestSceneWater.java]

now your link is complete.

For an image use the img-attribute,

image:{img-jmonkeyengine}jme3-testdata/src/main/resources/Effects/Smoke/Smoke.png[Smoke.png,width="96",height="32",align="right"]

To link to the forum,

link:{uri-forum}t/monkeys-at-the-beach/15000[Rendering Water as Post-Process Effect]

For a javadoc,

link:{uri-javadoc}com/jme3/bullet/control/BetterCharacterControl.html[BetterCharacterControl]

For detailed information on linking and attributes see the ASCIIDoctor documentation.

1 Like