Skins
More actions
You can choose bundled skins in .wikven.yaml.
Supported skins
Wikven supports three skins. This documentation site is built with all three, so every change is exercised in each of them.
- Vector (default;
Vectorselects the skin'svector-2022variant, Vector 2022) - MinervaNeue (mobile-oriented)
- Citizen (third-party, fetched at build time)
Any other skin is untested rather than refused: every skin bundled with MediaWiki is available by name, MonoBook among them, and a third-party skin can be fetched like Citizen is.
Minerva needs more said about it than the other two, a build working around parts of the skin rather than configuring them. That is collected in the appendix rather than here.
Configuring the skin
You can change the skin by setting skins. The first skin in the list is used as the default.
skins:
- MinervaNeue
Third-party skins
A skin that is not bundled can be listed in skins too, with its source declared in WikvenRepositories. It is fetched at build time and may be the default like any other. This documentation site fetches Citizen this way, offered alongside the other two.
skins:
- Example
config:
WikvenRepositories:
Example:
repository: https://github.com/example/Example.git
reference: REL1_46
Skin-specific configuration
Use the config map.
config:
VectorResponsive: false
A setting reaches the skin the same way any other does, but it only does something if the skin still reads it in a build. Minerva is the one place where most do not; see Minerva settings in the appendix before reaching for one.
Appendix: Minerva
Minerva and MobileFrontend
MinervaNeue is bundled with MediaWiki; MobileFrontend, which it grew up alongside, is not. Without it the skin skips its own initMobile.js and loses what that sets up, the table of contents toggle among it. Fetch the pair if you enable Minerva. This site does, so the recommended configuration is the one every build renders.
skins:
- MinervaNeue
extensions:
- MobileFrontend
config:
WikvenRepositories:
MobileFrontend:
repository: https://github.com/wikimedia/mediawiki-extensions-MobileFrontend.git
reference: REL1_46
Wikven renders Minerva without it as well: the entries it offers that a static host cannot serve are dropped either way.
How Minerva is supported
Minerva is built and exercised like the other two, but more of that support is Wikven working around the skin than configuring it. Minerva builds its main menu from its own definitions rather than from MediaWiki:Sidebar, and several of its controls expect MobileFrontend or a live wiki behind them, so the build stands in for both:
- The site's own navigation is written into the main menu of every rendered page, there being no sidebar section the skin would read it from.
- Random, Recent changes, Special pages and Preferences are hidden with a stylesheet rather than dropped: the skin inserts them unconditionally, so the anchors are still in the exported HTML.
- Community portal is dropped properly, through the message the skin already checks.
- The colour theme and the skin to read in are on the baked
Settingspage, the skin's own beingSpecial:MobileOptions. - The language button is hidden, its overlay being MobileFrontend's.
- Without MobileFrontend the table of contents arrives collapsed and the toggle that would open it is never drawn, so a stylesheet opens it again.
A reader meets none of this. It is worth knowing before changing Minerva's chrome, though: a change there usually lands in maintenance/fillMinervaMenu.php or resources/skins.minerva.styles.less rather than in configuration.
Minerva settings
Most of the $wgMinerva* settings do nothing in a build, whether or not MobileFrontend is installed. Ten of the sixteen the skin declares are registered as MobileFrontend features and read back in SkinOptions::setMinervaSkinOptions(), which runs from the RequestContextCreateSkinMobile hook — and MobileFrontend fires that only once it has decided to serve a mobile view, which takes a mobile domain, a mobile device, or useformat=mobile. A bake is none of those, so the skin options keep the defaults compiled into them and these settings are inert: MinervaShowCategories, MinervaPageIssuesNewTreatment, MinervaTalkAtTop, MinervaDonateLink, MinervaDonateBanner, MinervaHistoryInPageActions, MinervaOverflowInPageActions, MinervaAdvancedMainMenu, MinervaPersonalMenu and MinervaNightMode.
The other six the skin reads off the configuration itself, so they behave as documented: MinervaEnableSiteNotice, MinervaAlwaysShowLanguageButton, MinervaDownloadNamespaces, MinervaNightModeOptions, MinervaTypeahead and MinervaABSamplingRate. MinervaTypeahead is the one worth reaching for: the skin's typeahead runs on the static index rather than on the search API the setting names, so its options are read while its API URLs are not, and the empty thumbnail column is turned off there — see Searching. MinervaABSamplingRate has nothing to act on, there being no A/B bucketing to sample. The language button is hidden either way, its overlay being MobileFrontend's.
What the inert ones would have configured, Wikven supplies its own way where it can: the colour theme is on the Settings page the build writes in place of Special:MobileOptions, and the site's own navigation is written into the main menu of every rendered page.