Media Wiki Configure Site Logo: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 2: Line 2:
* https://www.mediawiki.org/wiki/Manual:$wgLogos
* https://www.mediawiki.org/wiki/Manual:$wgLogos
=Internal=
=Internal=
* [[Media_Wiki_Operations#Configure_Site_Logo|Media Wiki Operations]]
* [[Media_Wiki_Concepts#Site_Logo|MediaWiki Concepts]]
* [[Media_Wiki_Concepts#Site_Logo|MediaWiki Concepts]]
=Overview=
=Overview=
Add to [[Media_Wiki_Concepts#LocalSettings.php|LocalSettings.php]]:
Add to [[Media_Wiki_Concepts#LocalSettings.php|LocalSettings.php]]:
<syntaxhighlight lang='php'>
<syntaxhighlight lang='php'>
$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,
Line 27: Line 29:
The value should be a relative path from DOCUMENT_ROOT.
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.
⚠️ Do not simply overwrite the default logo installed with MediaWiki <code>/resources/assets/wiki.png</code>. This file will automatically be overwritten when you upgrade and your changes will be lost.

Latest revision as of 19:06, 29 December 2023

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.