|サーバー URL とファイル パス: $wgLogos|
|The URL path to various wiki logos.
|導入されたバージョン:||1.35.0 (Gerrit change 562588; git #8cd2e133)|
|許容される値:||(array of factors and relative paths or urls)|
|その他の設定: アルファベット順 | 機能順|
An array with factors and their associated relative paths or URL paths to the different versions of the wiki logo. (i.e., the image displayed in the upper-left corner of the page in most MediaWiki installations).
- The icon version should be a square and should be nominally 50×50 pixels if SVG, or 100×100 pixels if raster in order to support HiDPI.
SVG however is recommended. Current support for this key is limited to Skin:ベクター, Skin:Timeless, and Skin:Refreshed, but this is recommended for all new skins. Note that other skins typically require a larger icon if they support this, so using an SVG instead is recommended as it will scale correctly across all of them.
- The 1x version should be 135px wide by up to ~155px tall.
This is because the 1.5x and 2x versions assume a nominal width of 135px, and up to 155px tall will fit without issues in standard skins. This supports older skins and in the long-term future will be deprecated. We recommend skins support the preferred `icon`.
- The 1.5x version should 202px wide, matching the aspect ratio of the 1x.
(so up to 232px tall, for 155px nominal height.) The key will be deprecated in future and its use is not recommended.
- The 2x version should be 270px wide, matching the aspect ratio of the 1x.
(so up to 310px tall, for 155px nominal height.) The key will be deprecated in future and its use is not recommended.
- The svg version replaces the need for a 1x, 1.5x, and 2x version, but should follow the same nominal size guidelines, fitting within 135px wide and 155px tall when resized to 135px wide.
The key will be deprecated in future and its use is not recommended.
There are also two optional fields for additional assets to show next to the logo:
- The wordmark should be a landscape logo, with maximum set width or height, as these are specified under the
- The same is true for the tagline, which typically corresponds to the non-sitename part of MediaWiki:Tagline.
All values (except
height) can either be a fully-qualified URL or a relative path from DOCUMENT_ROOT.
If it's a relative path, it has to start with a slash (a file in DOCUMENT_ROOT is /file.png, not file.png).
Instead, the image will be cut off so that only part of it (the upper left-hand corner to be precise) will be visible.
If this corner is completely white, it might look like the image would not display, although in fact it does.
$wgLogos = [ '1x' => "path/to/1x_version.png", // path to 1x version '1.5x' => "path/to/1.5x_version.png", // path to 1.5x version '2x' => "path/to/2x_version.png", // path to 2x version 'svg' => "path/to/svg_version.svg", // path to svg version 'icon' => "path/to/icon.png", // A version of the logo without wordmark and tagline 'wordmark' => [ 'src' => "path/to/wordmark_version.png", // 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", // path to tagline version 'width' => 135, 'height' => 15, ], ];
Depending on your server settings, the information on which image to use may be cached inside a server cache. Also, images may be cached inside the web browser for a long time so that you do not immediately see the new logo, if you changed the according image file. In this case it might be necessary to especially empty caches and to reload the image URL in your web browser so that the browser downloads the current version from the server.
|警告:|| Do not simply overwrite the default logo installed with MediaWiki (|