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.
- Host: GitHub
- URL: https://github.com/guoyunhe/mediawiki-extension-enlightenedtitle
- Owner: guoyunhe
- License: gpl-3.0
- Created: 2018-04-19T19:22:27.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-24T11:23:30.000Z (about 7 years ago)
- Last Synced: 2025-01-10T17:39:49.481Z (5 months ago)
- Language: PHP
- Size: 18.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.