https://github.com/deuxhuithuit/amp
Transforms html into amp-html
https://github.com/deuxhuithuit/amp
amp amp-html symphony-cms symphony-cms-extension
Last synced: about 10 hours ago
JSON representation
Transforms html into amp-html
- Host: GitHub
- URL: https://github.com/deuxhuithuit/amp
- Owner: DeuxHuitHuit
- License: other
- Created: 2017-11-07T22:09:20.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-11-07T22:10:29.000Z (almost 8 years ago)
- Last Synced: 2025-03-14T12:45:24.044Z (7 months ago)
- Topics: amp, amp-html, symphony-cms, symphony-cms-extension
- Language: PHP
- Homepage: http://symphonyextensions.com/extensions/amp/
- Size: 808 KB
- Stars: 3
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AMP
> Automagically transform your html ouput into valid amp-html
### SPECS ###
Transforms html into amp-html via a simple wrapper around [Lullabot/amp-library](https://github.com/Lullabot/amp-library)
### REQUIREMENTS ###
- Symphony CMS version 2.7.x and up (as of the day of the last release of this extension)
### INSTALLATION ###
- `git clone` / download and unpack the tarball file
- Put into the extension directory
- Enable/install just like any other extensionYou can also install it using the [extension downloader](http://symphonyextensions.com/extensions/extension_downloader/).
For more information, see
### HOW TO USE ###
- Enable the extension
- Visit your url and append /amp/ at the end
- Add a `` to make your content discoverable```xslt
```
#### Options ###
- Disable amp generation on certain pages by adding the `no-amp` page type.
- Use [cachelite](http://symphonyextensions.com/extensions/cachelite/) to cache the result.
- The extension add a `` node in `/data/params` which contains 'Yes' when the conversion will occur. 'No' otherwise.
- Create alternate xslt templates by creating `_amp.xsl` files.
- Replace content before or after the amp conversion.
This can be done using regular expressions in the `config.php` file.```php
###### AMP ######
'amp' => array(
'pre-regexp' => array(
'/regular expression before conversion/' => 'replacement',
),
'post-regexp' => array(
'/regular expression after conversion/' => 'replacement',
),
),
########
```### DEBUG ###
The extension provides its own devkit to be able to debug the html to amp conversion.
Simply add `?debug-amp` to your url to enable the devkit.### LICENSE ###
MIT
*Voila !*
Come say hi! ->