Extension:AcceleratedMobilePages

From mediawiki.org
MediaWiki extensions manual
AcceleratedMobilePages
Release status: beta
Description Provides an action to show an AMP compliant version of a MediaWiki page.
Author(s) Florian Schmidt (Florianschmidtwelzowtalk)
MediaWiki
License MIT License
Download

The AcceleratedMobilePages extension provides an action for pages in the main namespace to show an AMP compliant version of the page.

Installation[edit]

Usage[edit]

The extension enables a new action, amp, on every page in the main namespace. Assuming, you've a page called MySuperContentPage on your wiki, and short URLs are enabled, you can navigate to the following URL to open the AMP compliant version of that content page:

https://www.example.com/wiki/MySuperContentPage?action=amp

On this page, the original one is linked as a canonical link, as required by the AMP documentation. Also, the content page get's a new link entry, amphtml, as well, linking to the amp action.

Customizing the styling[edit]

The style of the amp compliant pages is borrowed from the MobileFrontend extension and minimized to the absolute required set of instructions. AMP has the goal to make pages as fast as possible while loading them, in order to achieve that, this extension targets to have a minimal set of styling rules, only.

Currently, also, the styling can not be customized or replaced without changing the extension code, which would make upgrading this extension impossible and is not recommended nor supported. If the styling does not fit your needs, please open an issue and explain the reasons why additional styling is needed.

Limitations[edit]

Because of the nature of this extension, there're a lot of limitations, this extension has, especially when comparing a fully-featured MediaWiki page with an AMP optimized one, which only target is a user reading it. Refer to the README of the extension to see a full list of current limitations.

See also[edit]