Fix Rebel Engine API documentation not displaying images #31
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, the Rebel Engine API documentation doesn't display images. Instead of images, there are links to images stored on GitHub; specifically
https://raw.githubusercontent.com
.This PR enables images to be displayed in the Rebel Engine API documentation and embeds the images currently linked to on GitHub using the local copies stored on https://docs.rebeltoolbox.com.
For example, this is the Rebel Engine API
Color
class documentation:Image files still need to be added independently to the RebelDocumentation repository, but they can now be referenced and embedded in the Rebel Engine API documentation using an
[img]
tag. The image tag follows the BBCode[img]
tag format and includes the options supported by the DocUtils Image format used by Sphinx. Spinx is used to create the Rebel Toolbox documentation: https://docs.rebeltoolbox.com/. The[img]
tag options included arealt
height
width
scale
align
andtarget
. In addition it includes acaption
option to add the Sphinxfigure
caption below the image, and it supports the BBCode shorthand for specifying the image size. For example, to embed the image shown above:[img caption="Color constants cheatsheet"]/img/color_constants.png[/img]
Includes a complete refactor of
make_rst.py
(which has been renamed torst_from_xml.py
) used by RebelDocumentation to convert the RebelEngine API XML files to the Rebel Documentation API ReST files. The ReST files are used to create the Rebel Engine API documentationhtml
files onhttps://docs.rebeltoolbox.com/
. The refactor makes the script easier to understand and maintain; including adding new features such as enabling images in the API documentation.