An open API service indexing awesome lists of open source software.

https://github.com/guoyunhe/mediawiki-extension-enlightenedtitle

Improve HTML <title> tag output of MediaWiki. Better for SEO and readability.
https://github.com/guoyunhe/mediawiki-extension-enlightenedtitle

Last synced: 3 months ago
JSON representation

Improve HTML <title> tag output of MediaWiki. Better for SEO and readability.

Awesome Lists containing this project

README

        

# EnlightenedTitle - MediaWiki extension

Improve HTML `` tag and `

` tag output of MediaWiki. Better for SEO and readability.

## Design & Thinking

MediaWiki provides a configuration to change `` of pages. For example:

* MediaWiki:Pagetitle (all pages)
```
$1 - RabbitWiki, world of rabbits and bunnies
```
* MediaWiki:Pagetitle-view-main-page (only main page)
```
RabbitWiki, world of rabbits and bunnies
```

`$1` is the page name, which cannot be changed. For example:

> Help:Image/How to upload

Page titles of subpages and namespaces are not good for SEO and reading.

### HTML Title

We want to convert `` from:

> Help:Image/How to upload - RabbitWiki, world of rabbits and bunnies

to

> How to upload - Image - Help - RabbitWiki, world of rabbits and bunnies

### First Heading & Subpages

And convert first heading and subpages from:

> # Help:Image/How to upload
>
> [<](#) | [Help:Image](#)

to

> [Home](#) / [Help](#) / [Image](#) / **How to upload**
>
> # How to upload

## Installation

```bash
cd path/to/wiki/extensions/
git pull [email protected]:guoyunhe/mediawiki-extension-EnlightenedTitle.git EnlightenedTitle
```

Edit LocalSettings.php and this line:

```php
How to upload | Image | Help - RabbitWiki, world of rabbits and bunnies

## Configuration

Add following code to LocalSettings.php to change default behavior of the extension.

### $wgEnlightenedTitleHTMLTitleSeparator `string`

Separator between subpages and namespace in HTML ``. Default value is `' - '`.

```php
`. Default
value is `true`.

```php
Help - Image - How to upload - RabbitWiki, world of rabbits and bunnies

## Copyright

2018 Guo Yunhe.

## License

GNU General Public License version 3 or later.