Fix Rebel Engine API documentation not displaying images#31
Merged
DanielaOrtner merged 4 commits intoJan 30, 2024
Merged
Conversation
DanielaOrtner
approved these changes
Jan 30, 2024
Contributor
DanielaOrtner
left a comment
There was a problem hiding this comment.
What an improvement! Thanks for the good work. It's always best to have the images inline rather than having to go to another page.
Thanks :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Colorclass 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 arealtheightwidthscalealignandtarget. In addition it includes acaptionoption to add the Sphinxfigurecaption 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 documentationhtmlfiles 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.