Could the gramps-projects allow GitHub images to make drafting addon documentation easier?
Uploading screen captures to the wiki is awkward.
And while in beta, the dialogs for addons are in continous revision but the wiki image system is too wasteful … it maintains a history of “throwaway” images.
If we could use GitHub images (posted to repositories for use in README.md docs) during the early documentation, then it becomes easier to support quality documentation during the “Addon” beta cycle.
This Discourse domain might be another trusted image source.
(When the addon goes into broad release, the image should be committed to the wiki.)
from Google AI Overview
Images from other domains can be used in MediaWiki if the system administrator enables the option and a user uploads the file. By default, images from outside the wiki are not displayed to prevent malicious users from collecting visitor information.
To enable external images, you can:
Add $wgAllowExternalImages = true; to LocalSettings.php
To restrict the list of domains, use $wgAllowExternalImagesFrom
Once enabled, users can add images from external domains by pasting the image’s full URL into the wiki text. For example, https://domain.com/images/image_file.png will display the image.
If you want to use images from a trusted source, like your own domain, you can set $wgAllowExternalImages to false and use $wgAllowExternalImagesFrom
I believe the wiki already allows this because the on the portal translators page it shows an external image from the weblate website ( see the following template Template:Translators/Weblate looking at the templates view source page the links to the images are plain urls eg
Checked the wiki and see that I already added urls for github and gramps discourse back in May 2021 , but as @Gioto points out the only format accepted using this method are bare (plain) urls (but you can embed the url in a table).
Current settings from Gramps mediawiki ( LocalSettings.php )
Darn. We are going to have a structured way to extract that part of the path if it is going to be part of the new addon wiki documentation template.
There is a reproducible method for extracting the Discourse image path. We will need something for similar for GitHub images. (Since they could be in branches, we cannot assume they will always be in a refs/head/ path.)
It seems like viewing the GitHub image file in a new window has the https://raw.githubusercontent.com/ URL in the new window’s address bar.
Then pasting that URL in a line of the MediaWiki page will render the image on the page… at 100% size. Parameters (like size or alignment) are not supported with external images. .png, .jpg, and .gif are supported supported as external image links in MediaWiki. .svg, WebP is not natively supported.
Now we have to find a process for sussinng out a URL for re-using a Discourse image.
My first thought was directly transposing the developer’s README.md markdown into MediaWiki markdown and subbing in the raw URL for each image. (There’s an removed {see the diff} experiment of this for FTV on User:Ztlxltl page. The image substitution worked for the .png but not the .svg image. Had to upload that to a MediaWiki file.)
But the template also need the Language bar, the 3rd Party Addon note at the top. And a table row template for cross-referencing the new Addon in the 5.2 addons table template.
Nick has mentioned the past generating an addon list for the table and a plugin doc. But any movement towards that is on hold until our MediaWiki instance can have the Lua extension.
Maybe a developer audience Text Report could output a table listing for a selected registered Plugin? And another report could make the shell of a wiki page? (At some point in the future, it will probably make sense to spin out wiki pages for all the core plugins. This would simplify the flow of the wiki.)