Skin:WikimediaApiPortal

MediaWiki skins manual - category
WikimediaApiPortal
Release status: betaCategory:GPL licensed skinsCategory:Beta status skins
Description Skin for the Wikimedia API Portal
Compatibility policy Snapshots releases along with MediaWiki. Master is not backwards compatible.Category:Skins with release branches compatibility policy
MediaWiki 1.36+
License GNU General Public License 3.0 only
Download Category:Skins in Wikimedia version control
Example Example on Skins wiki
Quarterly downloads 6 (Ranked 19th)
Translate the WikimediaApiPortal skin if it is available at translatewiki.net
Issues : Open tasks · Report a bug
Category:All skins

WikimediaApiPortal is a MediaWiki skin developed by the Platform Engineering Team in 2020 as part of the API Gateway initiative. The skin was designed to mimic the look and feel of conventional developer portals by incorporating header and sidebar navigation elements and following the Wikimedia Design Style Guide. The skin uses the Bootstrap CSS framework, OOUI library, and Mustache templates. The skin was created for use with the Wikimedia API Portal, so some elements of the design such as the site logo and footer are specific to Wikimedia.

Category:Skins which require code modification

Installation

WikimediaApiPortal requires MediaWiki 1.36 or later.

  • Download and place the file(s) in a directory called WikimediaApiPortal in your skins/ folder.
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadSkin( 'WikimediaApiPortal' );
    
  • Yes Done - Navigate to Special:Version on your wiki to verify that the skin is successfully installed.
  • To set the default skin as WikimediaApiPortal, add the following code to the bottom of your LocalSettings.php:
$wgDefaultSkin = 'wikimediaapiportal';

Configuration

Variable name Required? Default Type Description
$wgWMAPIPExtraUserMenuSpecialPages Optional [] Array Names of special pages to add as localized links to the user menu. Do not need to start with Special:. For example, the Wikimedia API Portal includes the ['AppManagement'] special page (provided by Extension:WikimediaApiPortalOAuth) in the user menu.
$wgWMAPIPSidebarSpecialPages Optional [] Array Names of special pages that form a dedicated navigation sidebar. If one of those pages is being rendered, the navigation sidebar will be shown, and the given page will be highlighted. This provides an easy way to navigate between a small set of frequently used special pages on the site. Do not need to start with Special:. For example, the Wikimedia API Portal uses a sidebar that includes the ['AppManagement', 'Notifications', 'Preferences'] special pages.

WikimediaApiPortal requires subpages enabled in any namespaces that should support sidebar navigation and shortened display titles. Add the $wgNamespacesWithSubpages configuration setting to your LocalSettings.php to enable subpages. For example, to enable subpages in the main namespace:

$wgNamespacesWithSubpages[NS_MAIN] = true;

Usage

Sidebars allow you to navigate easily between related pages. Subpages are automatically added to the sidebar of the parent page. To order elements in a sidebar, add {{DEFAULTSORT:1}} where the number represents the order in the sidebar. DEFAULTSORT values must be unique between subpages of the same parent page; if multiple subpages share the same DEFAULTSORT value, neither page appears in the sidebar.

Header navigation

Use the MediaWiki:Sidebar page to control the links that appear in the header navigation bar. For example, you can set the header to link to a set of landing pages instead of the default navigation.

To add content to the footer, edit the wikimediaapiportal-skin-footer-links message in i18n/en.json.

Category:Skins used on Wikimedia#WikimediaApiPortal
Category:All skins Category:Beta status skins Category:GPL licensed skins Category:Skins in Wikimedia version control Category:Skins used on Wikimedia Category:Skins which require code modification Category:Skins with release branches compatibility policy Category:WMF Projects 2020q1 Category:WMF Projects 2020q2 Category:WMF Projects 2020q3 Category:WMF Projects 2020q4