Extension:Radyjonka

The Radyjonka MediaWiki extension provides a basic support for creating a progressive web app (PWA) from the MediaWiki instance. It also allows to insert some content to the HTML head (linked data etc.). It is developed mainly for the purposes of WikiSkripta wiki project.

Configuration for linked data
If you want to add some linked data to your site (probably because of improving your site's search results), just add an associative array to your :

$wgRadyjonkaLinkedData = [ "@context" => "https://schema.org", "@type" => "WebSite", "url" => "https://www.mymediawikiaddress.com/", "potentialAction" => [ "@type" => "SearchAction", "target" => "https://www.mymediawikiaddress.com/index.php?search={search_term_string}", "query-input" => "required name=search_term_string" ] ];

This associative array will be translated into reasonable JSON and inserted to the HTML head of your wiki.

For more inspiration how to use linked data for improving search results please visit: https://developers.google.com/search/docs/data-types/article

Configuration for PWA
Progressive web apps (PWAs) are websites that provide some offline content for the user and can be installed on desktops or mobile phones and feel like native apps of the device. Read more about PWA.

To enable progressive web app on your wiki, just insert this piece of code to your :

$wgRadyjonkaPWA = true; Then you'll need to meet some criteria:


 * You have to write your own web app's  and place it in the root directory of your wiki. Read documentation or visit WikiSkripta's manifest for inspiration.
 * You'll need two PNG icons, 192x192 px and 512x512 px (see manifest.json).
 * You'll need some offline landing page that says something like: "You're offline now, please return to the home page."
 * You'll need a javascript service worker named  in your root directory of the wiki (i.e. where the   file is stored). That service worker file declares, what is the behavior of the website when online and when offline. You can pre-cache some pages, you can cache pages on demand (like let user click on "Read later" button) or cache visited articles automatically. You can even make your wiki editable when the user is offline (and edits will be sent after reconnecting the network). This is unfortunately part of the work that you have to write yourself according to your needs. It is not included in the extension. For documentation on service workers please visit Google Developers. For inspiration check the detailed and explained   file in the extension's repository.
 * Your site has to be served over a secure and valid HTTPS connection. Make sure that your HTTP version correctly redirects to HTTPS.

License
Created by Petr Kajzar, 1st Faculty of Medicine, Charles Univesity, for WikiSkripta medical wiki. Released under Creative Commons Zero v1.0 Universal license.

To the extent possible under law, I have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.