ctc-oss / fapolicy-analyzer

Tools to assist with the configuration and management of fapolicyd.
https://ctc-oss.github.io/fapolicy-analyzer
GNU General Public License v3.0
12 stars 5 forks source link

Allow relative path user guide images #795

Closed tparchambault closed 1 year ago

tparchambault commented 1 year ago

Allows for images to be stored beside the documentation in the doc repo.

Adds support for relative path image references to be used, allowing us to store images instead of relying on the GitHub content storage. The drag and drop method to the GitHub UI will continue work with this change, though the in-repo storage is preferred.

Closes #756

tparchambault commented 1 year ago

Performed a test where the help:fapolicy-analyzer prefix were omitted from the img src attributes essentially making them relative. The Gtk Webkit UI that is embedded within the fapapolicy-analyzer did not render the images. The same User-Guide html file was rendered correctly by the Firefox browser on the target system.

tparchambault commented 1 year ago

LOCAL_HELP_GFX=1 python help update/

The magic variable to build the User-Guide.html with relative image src references that can be viewed with a web brower: LOCAL_HELP_GFX just needs to be defined within the user's environment.

tparchambault commented 1 year ago

This PR will should copy image src files into the relative media/ subdirectory. There is a possibility of basename clashes.

dorschs57 commented 1 year ago

@tparchambault take a look at the commit I just pushed. I think this will provide a better workflow. It allows for all images to be loaded and displayed from relative paths. This will work if the help doc is loaded from the local dev path or from help scheme path.

jw3 commented 1 year ago

@tparchambault is this gtg?

jw3 commented 1 year ago

@tparchambault any final words