Most projects hide the heading on the main page by default. This is done, by blanking the associated message, however, this often results in an empty h1 being output to the page.
In Minerva projects see a user specific message "Welcome, USERNAME!" at the top of the page.
This issue is now showing up as part of #desktop-improvements where some editors would like to show the heading on the main page, with text other than the page name,
# Acceptance criteria
- [] On a default MediaWiki instance the heading is present on the main page for Vector
- [] On a default MediaWiki instance the heading is not present on the main page for Minerva (this will be changed in T293470)
- [] An editor can change the main page title to "Welcome to {{PROJECTNAME}}!"
- [] The title for logged in users and anonymous users is different.
- [] Editors can blank the associated message to remove the heading on both Vector and Minerva (needs changes in Vector and Minerva for this to work).
- [] Editors can blank the associated message for logged in users to hide the logged-in user heading (needs changes in Vector and Minerva for this to work).
- [] The <title> tag in the head is not impacted by the change
# Developer notes
https://gerrit.wikimedia.org/r/c/mediawiki/core/+/734420 would allow editors to remove the page title from the main page by blanking the page MediaWiki:Mainpage-title
Changes in Vector and Minerva would then be made to check for an empty string
e.g.
```
<h1 id="firstHeading">{{{html-title}}}</h1>
```
becomes
```
{{#html-title}}}<h1 id="firstHeading">{{{.}}}</h1>{{#html-title}}}
```
Inside Minerva, we'd need to refactor SkinMinerva::getHeadingHtml to use html-title after the core change has been merged and to address the <title> issue, we'd remove the code inside SkinMinerva::prepareHeaderAndFooter:
```
if ( $title->isMainPage() ) {
$pageTitle = '';
$msg = $this->msg( 'mobile-frontend-logged-in-homepage-notification', $user->getName() );
if ( $user->isRegistered() && !$msg->isDisabled() ) {
$pageTitle = $msg->text();
}
$out->setPageTitle( $pageTitle );
} else
```