Skip to content

Github mirror of "mediawiki/extensions/StructuredNavigation" - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing)

License

Notifications You must be signed in to change notification settings

wikimedia/mediawiki-extensions-StructuredNavigation

Repository files navigation

StructuredNavigation

A MediaWiki extension that allows creating machine-readable navigation templates.

How to Use

You can play with an example in /docs/examples. For this example, let's try using wikipedia-en-dontnod-entertainment.json.

  1. Create a new page at Navigation:Dontnod Entertainment, import the JSON into that page, then save your edit.
  2. At a separate wikitext page, add <mw-navigation title="Dontnod Entertainment" /> and press save.

Install

This extension requires MediaWiki 1.34 (or greater) and PHP 7.4 (or greater). To install:

  1. Git clone this repository locally on your wiki.
  2. Add this line to your LocalSettings.php file:
wfLoadExtension( 'StructuredNavigation' );
  1. Install PHP package dependencies using composer:
composer update

Benefits

Using this extension allows creating navigations that:

  • are machine-readable in JSON, an open format for storing data
  • are retrievable with MediaWiki's Action API and REST API
  • only contain data: presentation details are separated from the content. No wikitext, inline CSS, or HTML required; e.g the separator symbol is auto-appended after each link using CSS.
  • are automatically tracked using the structurednavigation page property (try using [[Special:PagesWithProp/structurednavigation]])
  • produce semantic and accessible HTML

License

Licensed under the MIT license.

About

Github mirror of "mediawiki/extensions/StructuredNavigation" - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing)

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published