PHPackages                             dorsetdigital/silverstripe-amppages - 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. [Framework](/categories/framework)
4. /
5. dorsetdigital/silverstripe-amppages

ActiveSilverstripe-vendormodule[Framework](/categories/framework)

dorsetdigital/silverstripe-amppages
===================================

Provides a basic support framework for AMP pages in SS4

v1.0.0beta(8y ago)4275BSD-3-ClausePHP

Since Feb 1Pushed 8y ago2 watchersCompare

[ Source](https://github.com/DorsetDigital/silverstripe-amppages)[ Packagist](https://packagist.org/packages/dorsetdigital/silverstripe-amppages)[ Docs](https://github.com/DorsetDigital/silverstripe-amppages)[ RSS](/packages/dorsetdigital-silverstripe-amppages/feed)WikiDiscussions master Synced today

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

silverstripe-amppages
=====================

[](#silverstripe-amppages)

Adds semi-automated AMP page functionality and provides some basic assistance in creating AMP pages in Silverstripe 4.

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/2b5ca46d949c5cccbf764326535045f8ddd32111d5ad581154dbd04b15a7ec27/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f446f727365744469676974616c2f73696c7665727374726970652d616d7070616765732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/DorsetDigital/silverstripe-amppages/?branch=master)[![Build Status](https://camo.githubusercontent.com/f5a8e69882485257bfdb362854f98dbbaeedf8008275a773db8fb14c551351fe/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f446f727365744469676974616c2f73696c7665727374726970652d616d7070616765732f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/DorsetDigital/silverstripe-amppages/build-status/master)[![License](https://camo.githubusercontent.com/b3775a2de17853a90995faa104f941eef3ad3c40cc89e34b8b1eaea014614d4e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d425344253230332d2d436c617573652d626c75652e737667)](LICENSE.md)[![Version](https://camo.githubusercontent.com/359a123f861c470d8dc3bd5007b06a9b724a919f7edaae0e9814b2b669506745/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f646f727365746469676974616c2f73696c7665727374726970652d616d7070616765732e7376673f7374796c653d666c6174)](https://packagist.org/packages/dorsetdigital/silverstripe-amppages)

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

[](#requirements)

\*Silverstripe 4.0.x

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

[](#installation)

- Install the code with `composer require dorsetdigital/silverstripe-amppages`
- Run a `dev/build?flush` to update your project

Usage
=====

[](#usage)

*Please note:* this is not an 'out-of-the-box' solution, you'll need to do some work as well!

The add-on provides some of the basic framework for getting your site AMP-enabled. For pages in the SiteTree, a link is added to the html head which points at an AMP version of the page. There are base templates to deal with the fundamental requirements. These include some basic AMP boilerplate.

The controller which handles the AMP pages forcibly removes any scripts, CSS, etc. added via `Requirements` to the parent page. This is due to the strict limitations on what can be included in AMP. There is a base page template called `Amp.ss` and additional page types can be templated by adding a file called `ClassName_amp.ss` to your theme in the same directory as the non-AMP template.

In line with the AMP recommendations, CSS should be minified and included inline in the page.
To try and keep a consistent workflow, the `Requirements` class has been extended to provide the ability to inject AMP CSS into the AMP version of the page automatically.
It can be used in your page controller class as follows:

```

class ExamplePageController extends \PageController
{
    public function init()
    {
        parent::init();
        AmpPagesRequirementsExtension::ampCSS('amp');
    }
}

```

The above would automatically find a CSS file called `amp.css` in your theme's CSS directory and add the contents inline in the correct `` tag. Additional style sheets can be added by calling the `ampCSS()` method again, they will be appended. (Just remember, there's a size limit on the amount of CSS in AMP)

Useful Links
============

[](#useful-links)

See [The AMP Project](https://www.ampproject.org/) for more information about what you can and can't do in an AMP page

Credits
=======

[](#credits)

- Very much inspired by [Silverstripe AMP HTML for SS3](https://github.com/thezenmonkey/silverstripe-amp)
- Thanks to the Silverstripe Slack users for their patient assistance [Slack channel signup](https://www.silverstripe.org/community/slack-signup/)
- As always, thanks to the core team for all their hard work.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

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

Unknown

Total

1

Last Release

3022d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ee91a8692650ac93cf817af52118adff8e11bf18866964f492f3e434e4f33f35?d=identicon)[DorsetDigital](/maintainers/DorsetDigital)

---

Top Contributors

[![DorsetDigital](https://avatars.githubusercontent.com/u/15108750?v=4)](https://github.com/DorsetDigital "DorsetDigital (15 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")

---

Tags

ampamp-htmlsilverstripesilverstripe-4silverstripe-modulehtmlsilverstripeampamp-pages

### Embed Badge

![Health badge](/badges/dorsetdigital-silverstripe-amppages/health.svg)

```
[![Health](https://phpackages.com/badges/dorsetdigital-silverstripe-amppages/health.svg)](https://phpackages.com/packages/dorsetdigital-silverstripe-amppages)
```

###  Alternatives

[silverstripe/framework

The SilverStripe framework

7213.5M2.5k](/packages/silverstripe-framework)[dnadesign/silverstripe-elemental

Elemental pagetype and collection of Elements

1151.0M255](/packages/dnadesign-silverstripe-elemental)[cwp/cwp

CWP features module. We strongly recommend using it for all new sites. Future features will be delivered here.

11221.1k6](/packages/cwp-cwp)[swipestripe/swipestripe

Ecommerce module to create online shops using SilverStripe.

336.4k9](/packages/swipestripe-swipestripe)[symbiote/silverstripe-multisites

Allows for multiple websites to be managed through a single site tree.

1313.7k4](/packages/symbiote-silverstripe-multisites)[dorsetdigital/silverstripe-enhanced-requirements

Enhanced requirements for Silverstripe

117.8k4](/packages/dorsetdigital-silverstripe-enhanced-requirements)

PHPackages © 2026

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