2.1.2 • Published 4 years ago
hapi-amp v2.1.2
hapi-amp
Accelerated Mobile Pages (AMP) for Hapi.
Install
npm install hapi-amp
Usage
Basic:
// index.js
server.register(require('hapi-amp'));
# default.yaml
plugins:
hapi-amp:
Serving AMP pages
In order to service up an amp view you will need to create a file that matches a view but end with -amp
in the name.
Example:
reply('pages/homepage');
You'd name the mobile version pages/homepage-amp.html
We also expose a global view context __isAMP
.
Viewing
Direct the user to the same url but with a ?amp=1
query string.
2.1.2
4 years ago
2.1.0
6 years ago
2.0.0
6 years ago
1.0.0
7 years ago
1.0.0-beta.3
8 years ago
1.0.0-beta.2
8 years ago
1.0.0-beta.1
9 years ago