| This code base is maintained by theReader Experience team. |
Release status: stable | |
|---|---|
| Compatibility policy | Snapshots releases along with MediaWiki. Master is not backwards compatible. |
| License | GNU General Public License 2.0 or later |
| Download | |
| Example | Example on this wiki |
| Translate the Minerva Neue skin if it is available at translatewiki.net | |
| Vagrant role | minerva |
| Issues | Open tasks ·Report a bug |

Minerva is the skin that serves mobile traffic for Wikimedia projects across the world.Compared to other skins such asVector, it provides a much simpler user interface and is much more aggressive about optimizing for performance so that it can cater formobile users.
It is optimized for use with theMobileFrontend extension (which is done by settingwgMFDefaultSkinClass to 'SkinMinerva'), but, since MediaWiki 1.35, Minerva Neue can also be used without MobileFrontend.For earlier MediaWiki versions, MobileFrontend is required.
vagrant roles enable minerva -pMinervaNeue in yourskins/ folder.wfLoadSkin('MinervaNeue');$wgDefaultSkin='minerva';
$wgDefaultSkin='minerva' will makeMinerva your default skin even in desktop view. Ignore this line and instead use$wgDefaultMobileSkin='minerva'; (default in recent versions) if you want only MobileFrontend to use the Minerva skin.
Make sure to callwfLoadSkinafterwfLoadExtension.
With MobileFrontend integrated (mobile mode) the Minerva experience will be enhanced to include various other features including:
To benefit from these:
When MobileFrontend is installed, Minerva is modified to behave in a simplified mode. If you would like Minerva to behave more like the desktop version add the following code toLocalSettings.php:
$wgMinervaTalkAtTop['base']=true;$wgMinervaAdvancedMainMenu['base']=true;$wgMinervaPersonalMenu['base']=true;$wgMinervaHistoryInPageActions['base']=true;$wgMinervaOverflowInPageActions['base']=true;$wgMinervaShowCategories['base']=true;
Configuration is listed in the Minerva readme in your local download oronline.
$wgMinervaCountErrors - previously used to count errors via statsd. In the unlikely event you were using it as a 3rd party please refer toExtension:WikimediaEvents for client side error logging.Certain URLs in the main menu can be tweaked. These include:
Certain menu items will be enabled automatically when the relevant extension is added.
Items can be added to all menus except thenavigation menu via theSkinTemplateNavigation::Universal hook.
Items in the main menu (hamburger menu /MediaWiki:Sidebar navigation) can currently only bemodified as MediaWiki:Sidebar does not support the specification of icons.
$wgMinervaAdvancedMainMenu=["base"=>true,"loggedin"=>true,"amc"=>true,];$wgMinervaPersonalMenu=["base"=>true,"loggedin"=>true,"amc"=>true,];$wgMinervaOverflowInPageActions=["base"=>true,"loggedin"=>true,"amc"=>true,];$wgHooks['SkinBuildSidebar'][]=function(Skin$skin,&$bar){// Replace the random menu item with a history linkforeach($bar['navigation']as$key=>$item){if($item['id']==='n-randompage'){$item['icon']='history';$item['href']='/mylink';$item['msg']='minerva-page-actions-history';$bar['navigation'][$key]=$item;}}// add item to toolbox$bar['TOOLBOX'][]=['id'=>'t4','icon'=>'custom 4','text'=>'custom 4','href'=>'/wiki/Foo'];};$wgHooks['SkinTemplateNavigation::Universal'][]=function($t,&$s){// Add an action to the user menu$s['user-menu']['c1']=['icon'=>'custom 2','text'=>'custom 2','href'=>'/wiki/Foo'];// add an action to the page actions (views)$s['views']['c2']=['icon'=>'custom1','text'=>'custom 1','href'=>'/wiki/Foo'];};
$wgMinervaDonateLink['base']=true;
true and in 1.39false.When enabled a donate link will be added to the main menu.The donate link uses thesitesupport andsitesupport-url mediawiki messages.
The following notes major changes in Minerva for sysadmins upgrading their wiki.
MobileFrontend provides additional capabilities that are not available in MediaWiki core.You can comparedesktop vsmobile mode.
When operating in mobile mode the following features are available:
The desktop mode of the site is experimental.Bug reports and patches are appreciated.
When operating in desktop mode there are various issues that we are working towardsfixing.Your patches and help are welcomed.
If you have a question not answered by the page – please feel free to use the talk page to raise them.
Minerva works without MobileFrontend but installing MobileFrontend will provide several enhancements – notably reference and red link pop-up drawers, and a mobile optimized search and custom editor.These optimizations will apply to the desktop and mobile version.Currently it is not possible to disable the mobile view link but patches to that effect will gladly be accepted!
If the extension includes any UI, when testing your extension with Minerva, it is important to check if your extension works or degrades acceptably on break points.For testing purposes, Minerva operates on several breakpoints: 320px (@width-breakpoint-mobile), 720px (@width-breakpoint-tablet) and 1000px (@width-breakpoint-desktop).Your extension is expected to adapt to these breakpoints usingappropriate media queries.It is acceptable for a feature to disable altogether, provided it gives the user feedback where necessary e.g.
@import'mediawiki.skin.default.less';@mediascreenand(max-width:@width-breakpoint-tablet){.myfeature{display:none;}/* not supported for mobile users */.myfeature~.mobilewarning{display:block;}/* Show the warning message explaining why the feature was disabled. */}
Normally it's acceptable to use media queries for your extension and this will benefit all skins, however in some cases you may need Minerva specific behaviour.If so you can useManual:$wgResourceModuleSkinStyles to define styles.
The Minerva menu system is currently bespoke and does not work like other skins. We plan to fix this eventually so that Minerva makes use of the standard hook for modifying menus -Manual:Hooks/SkinTemplateNavigation::Universal.The work here is tracked inphab:T291568.If you would like to add menu items in the mean time, please use theMobileMenu hook.
| This skin is being used on one or moreWikimedia projects. This probably means that the skin is stable and works well enough to be used by such high-traffic websites. Look for this skin's name in Wikimedia'sCommonSettings.php andInitialiseSettings.php configuration files to see where it's installed. A full list of the skins installed on a particular wiki can be seen on the wiki'sSpecial:Version page. |
| This skin is included in the following wiki farms/hosts and/or packages: |