Giter Site home page Giter Site logo

wikimedia / mediawiki-extensions-structurednavigation Goto Github PK

View Code? Open in Web Editor NEW
0.0 19.0 0.0 1.23 MB

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: MIT License

JavaScript 3.55% PHP 90.06% Less 5.35% Mustache 1.04%

mediawiki-extensions-structurednavigation's Introduction

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.

mediawiki-extensions-structurednavigation's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar dringsim avatar neoncitylights avatar raymondde avatar somechris avatar thiemowmde avatar translatewiki avatar umherirrender avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.