Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/chrisbo246/mediawiki-loader

Import a Wikipedia article in your website using the Mediawiki API.
https://github.com/chrisbo246/mediawiki-loader

embed mediawiki-api wikipedia wikipedia-api wikipedia-article

Last synced: 20 days ago
JSON representation

Import a Wikipedia article in your website using the Mediawiki API.

Awesome Lists containing this project

README

        

# -={ mediawiki-loader }=- [DEMO](https://chrisbo246.github.io/mediawiki-loader/)

Import a Wikipedia article in your website using the Mediawiki API.

## Features

- Import a full article in a container.
- Fix links.
- Remove unnecessary text (contribution links, messages, etc...)
- Generate an excerpt without additional request.

### Requirements

- jQuery

## Install

Using Bower (or download the zip from Github).

```
bower install --save chrisbo246/mediawiki-loader
```

Load the **mediawiki-loader.js** script.

```

```

Import the **variables.scss** and **mediawiki-loader.scss** in your SASS file to cleanup the article of every Wikipedia annotations and make small style adjustments.

```
@import "/bower_components/mediawiki-loader/src/styles/variables.scss";
@import "/bower_components/mediawiki-loader/src/styles/mediawiki-loader.scss";
```

## Usage

Add a container with **.mediawiki-container** class and a **data-url**.

```


```

If you need an excerpt on the same page without having to make a second request, simply add a second container with a **.mediawiki-excerpt** class.

```


```

Don't forget to insert the required mention to the Wikipedia article.

```


```

## Bugs

Please use the [GitHub issue tracker](https://github.com/chrisbo246/pickyvagabond/issues) for all bugs and feature requests. Before creating a new issue, do a quick search to see if the problem has been reported already.