PHPackages                             wdmg/yii2-amp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. wdmg/yii2-amp

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

wdmg/yii2-amp
=============

Google AMP pages generator

1.1.0(3y ago)05341MITPHP

Since Jan 9Pushed 2y ago1 watchersCompare

[ Source](https://github.com/wdmg/yii2-amp)[ Packagist](https://packagist.org/packages/wdmg/yii2-amp)[ Docs](https://github.com/wdmg/yii2-amp)[ RSS](/packages/wdmg-yii2-amp/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (2)Versions (7)Used By (1)

[![Yii2](https://camo.githubusercontent.com/8f989c4232d99c88827cc336af846359f9c7ed51b0efffd5dd20ac8bd0b1781d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f72657175697265642d596969325f76322e302e33352d626c75652e737667)](https://packagist.org/packages/yiisoft/yii2)[![Downloads](https://camo.githubusercontent.com/12ab1df224d5a37acc7227b967269ba2523635ebb35fccf48b2c9c9bf217b375/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f77646d672f796969322d616d702e737667)](https://packagist.org/packages/wdmg/yii2-amp)[![Packagist Version](https://camo.githubusercontent.com/6d9cdb462a5747b2578574586d9ac0395e3ad2471d6aff9973a867d1d5a2cb75/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f77646d672f796969322d616d702e737667)](https://packagist.org/packages/wdmg/yii2-amp)[![Progress](https://camo.githubusercontent.com/d2c102b075c16f8a841e697b04c43bc93c8d092c5795ad8b3090d7fa993c258a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f70726f67726573732d72656164795f746f5f7573652d677265656e2e737667)](https://camo.githubusercontent.com/d2c102b075c16f8a841e697b04c43bc93c8d092c5795ad8b3090d7fa993c258a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f70726f67726573732d72656164795f746f5f7573652d677265656e2e737667)[![GitHub license](https://camo.githubusercontent.com/7dd987916dfa1d0a177168303bd178d7d1d33cb8f429c2d4bb8d7516b50d461e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f77646d672f796969322d616d702e737667)](https://github.com/wdmg/yii2-amp/blob/master/LICENSE)

[![Yii2 Google AMP](./docs/images/yii2-amp.png)](./docs/images/yii2-amp.png)

Yii2 Google AMP
===============

[](#yii2-google-amp)

Google AMP pages generator for Yii2.

This module is an integral part of the [Butterfly.СMS](https://butterflycms.com/) content management system, but can also be used as an standalone extension.

Copyrights (c) 2019-2023 [W.D.M.Group, Ukraine](https://wdmg.com.ua/)

Requirements
============

[](#requirements)

- PHP 5.6 or higher
- Yii2 v.2.0.35 and newest
- [Yii2 Base](https://github.com/wdmg/yii2-base) module (required)
- [Yii2 Options](https://github.com/wdmg/yii2-options) module (optionality)
- [Yii2 Pages](https://github.com/wdmg/yii2-pages) module (support)
- [Yii2 News](https://github.com/wdmg/yii2-news) module (support)

Installation
============

[](#installation)

To install the module, run the following command in the console:

`$ composer require "wdmg/yii2-amp"`

After configure db connection, run the following command in the console:

`$ php yii amp/init`

And select the operation you want to perform:

1. Apply all module migrations
2. Revert all module migrations
3. Flush AMP cache

Migrations
==========

[](#migrations)

In any case, you can execute the migration and create the initial data, run the following command in the console:

`$ php yii migrate --migrationPath=@vendor/wdmg/yii2-amp/migrations`

Configure
=========

[](#configure)

To add a module to the project, add the following data in your configuration file:

```
'modules' => [
    ...
    'amp' => [
        'class' => 'wdmg\amp\Module',
        'supportModels'  => [ // list of supported models for displaying a AMP pages
            'pages' => 'wdmg\pages\models\Pages',
            'news' => 'wdmg\news\models\News',
        ],
        'cacheExpire' => 3600, // cache lifetime, `0` - for not use cache
        'ampRoute' => '/' // default route to render AMP pages (use "/" - for root)
    ],
    ...
],

```

Routing
=======

[](#routing)

Use the `Module::dashboardNavItems()` method of the module to generate a navigation items list for NavBar, like this:

```

```

Status and version \[ready to use\]
===================================

[](#status-and-version-ready-to-use)

- v.1.1.0 - Update dependencies, copyrights
- v.1.0.4 - Update dependencies, README.md
- v.1.0.3 - Fixed models items retrieved
- v.1.0.2 - Up to date dependencies
- v.1.0.1 - Added default layout and view for AMP pages
- v.1.0.0 - Added console, migrations and controller, support for Pages and News models

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~235 days

Recently: every ~293 days

Total

6

Last Release

1139d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1635637?v=4)[Alexsander Vyshnyvetskyy](/maintainers/alex-wdmg)[@alex-wdmg](https://github.com/alex-wdmg)

---

Top Contributors

[![alex-wdmg](https://avatars.githubusercontent.com/u/1635637?v=4)](https://github.com/alex-wdmg "alex-wdmg (17 commits)")

---

Tags

googlegeneratorampyii2wdmgyii2-amp

### Embed Badge

![Health badge](/badges/wdmg-yii2-amp/health.svg)

```
[![Health](https://phpackages.com/badges/wdmg-yii2-amp/health.svg)](https://phpackages.com/packages/wdmg-yii2-amp)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
