Media Wiki Configure Site Logo: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 8: Line 8:
$wgLogos = [
$wgLogos = [
  '1x' => "resources/assets/cat.png", // path to 1x version
  '1x' => "resources/assets/cat.png", // path to 1x version
'1.5x' => "path/to/1.5x_version.png", // path to 1.5x version
'1.5x' => "path/to/1.5x_version.png", // Optional, path to 1.5x version
'2x' => "path/to/2x_version.png", // path to 2x version
'2x' => "path/to/2x_version.png", // Optional, path to 2x version
'svg' => "path/to/svg_version.svg", // path to svg version
'svg' => "path/to/svg_version.svg", // Optional, path to svg version
'icon' => "path/to/icon.png", // A version of the logo without wordmark and tagline
'icon' => "path/to/icon.png", // Optional, A version of the logo without wordmark and tagline
'wordmark' => [
'wordmark' => [
'src' => "path/to/wordmark_version.png", // path to wordmark version
'src' => "path/to/wordmark_version.png", // Optional, path to wordmark version
'1x' => "path/to/wordmark_version.svg", // optional if you want to support browsers with SVG support with an SVG logo.
'1x' => "path/to/wordmark_version.svg", // optional if you want to support browsers with SVG support with an SVG logo.
'width' => 135,
'width' => 135,
'height' => 20,
'height' => 20,
],
],
'tagline' => [
'tagline' => [
'src' => "path/to/tagline_version.png", // path to tagline version
'src' => "path/to/tagline_version.png", // Optional, path to tagline version
'width' => 135,
'width' => 135,
'height' => 15,
'height' => 15,

Revision as of 06:01, 18 November 2021

External

Internal

Overview

Add to LocalSettings.php:

$wgLogos = [
 '1x' => "resources/assets/cat.png",		// path to 1x version
	'1.5x' => "path/to/1.5x_version.png",	// Optional, path to 1.5x version
	'2x' => "path/to/2x_version.png",	// Optional, path to 2x version
	'svg' => "path/to/svg_version.svg",	// Optional, path to svg version
	'icon' => "path/to/icon.png",		// Optional, A version of the logo without wordmark and tagline
	'wordmark' => [
		'src' => "path/to/wordmark_version.png", // Optional, path to wordmark version
		'1x' => "path/to/wordmark_version.svg",	 // optional if you want to support browsers with SVG support with an SVG logo.
		'width' => 135,
		'height' => 20,
	],
	'tagline' => [
		'src' => "path/to/tagline_version.png",	 // Optional, path to tagline version
		'width' => 135,
		'height' => 15,
	],
];

The value should be a relative path from DOCUMENT_ROOT.

⚠️ Do not simply overwrite the default logo installed with MediaWiki (/resources/assets/wiki.png); this file will automatically be overwritten when you upgrade and your changes will be lost.