PHPackages                             silverstripers/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. silverstripers/amp

ActiveSilverstripe-vendormodule[Utility &amp; Helpers](/categories/utility)

silverstripers/amp
==================

Provide AMP HTML conversion to your SilverStripe project

43763PHP

Since Aug 4Pushed 2y ago2 watchersCompare

[ Source](https://github.com/HelloBetterLTD/amp)[ Packagist](https://packagist.org/packages/silverstripers/amp)[ RSS](/packages/silverstripers-amp/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

SilverStripe AMP
================

[](#silverstripe-amp)

AMP HTML⚡ Bundle - provide [AMP HTML](https://www.ampproject.org/) conversion to your SilverStripe website.

Requirements
------------

[](#requirements)

- lullabot/amp ^1.1.3
- silverstripe/framework 4+

Installation &amp; Usage
------------------------

[](#installation--usage)

Install with composer

```
composer require silverstripers/amp dev-master

```

### Configurations

[](#configurations)

#### Clearing Caches

[](#clearing-caches)

To clear the amp caches you need to set up an RSA Key.

Follow the instructions on the AMP Cache guide on [Generating Keys](https://developers.google.com/amp/cache/update-cache#rsa-keys).

To set up the private key use the following YAML configutation

```
SilverStripers\AMP\Control\AMPCache:
	key_file: 'PATH_TO_YOUR_PRIVATE_KEY'

```

#### Setting up class names

[](#setting-up-class-names)

The module allows you to set up class name of pages which are supported by AMPs.

```
---
Name: amps
---
SilverStripers\AMP\Control\AMPDirector:
  allowed_classes:
    - SilverStripe\Blog\Model\Blog
    - SilverStripe\Blog\Model\BlogPost

```

The configs above limits the amps support to Blog and BlogPost pages.

This module adds extensions on for your controllers where the pages will have an AMP based version with a URL suffix for each page.

EG:

/home/ will have /home/amp.html /about-us/ will have /about-us/amp.html

The mobile also provides a template global `$IsAMP` which you can use on any template to add specific HTML segments for the AMP version of the website.

The module adds cannonical URLs and amphtml links for the sites as well.

$IsAMP
------

[](#isamp)

In order to determine whether the current request is in AMP or not you can use `$IsAMP` variable.

```

```

Same way you can use the not as well

```

```

Elemental
---------

[](#elemental)

The module supports elemental module.

If you are having to override the templates for Elemental objects you can have templates with \_AMP suffix, when those templates are found the elements gets rendered using those.

Reporting Issues
----------------

[](#reporting-issues)

Please [create an issue](https://github.com/SilverStripers/amp/issues) for any bugs, or submit merge requests.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity21

Early-stage or recently created project

 Bus Factor1

Top contributor holds 67.9% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/6a6fa4ab2a74fee1ac574bf15dd3ce1f38f31fee60c186b4b24ee8d7e3090b52?d=identicon)[silverstripers](/maintainers/silverstripers)

---

Top Contributors

[![fonsekaean](https://avatars.githubusercontent.com/u/143939?v=4)](https://github.com/fonsekaean "fonsekaean (19 commits)")[![Mohan-SS](https://avatars.githubusercontent.com/u/125940731?v=4)](https://github.com/Mohan-SS "Mohan-SS (7 commits)")[![ss-koshala](https://avatars.githubusercontent.com/u/65384702?v=4)](https://github.com/ss-koshala "ss-koshala (2 commits)")

### Embed Badge

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

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

PHPackages © 2026

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