You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: AMP ⚡ using Gatsby
slug: amp-using-gatsby
lang: en-US
tags:
amp
gatsby
date: 2018-11-18T07:48:04.838Z
summary: >-
I created gatsby plugin for generating AMP (Accelerated Mobile Pages). I try
to explain how to use it.
I created gatsby plugin (called gatsby-plugin-html2amp) for generating AMP (Accelerated Mobile Pages). I try to explain how to use it.
It's easy to use 😁
Prepare Gatsby blog
$ npm install --global gatsby-cli
$ gatsby new gatsby-blog https://github.com/gatsbyjs/gatsby-starter-blog
then check the blog
$ cd gatsby-blog
$ npm start
# Access http://localhost:8000
Make it AMP !
Add plugin
$ npm install --save gatsby-plugin-html2amp
Set plugin configuration to gatsby-config.js at bottom of file.
title: AMP ⚡ using Gatsby
slug: amp-using-gatsby
lang: en-US
tags:
date: 2018-11-18T07:48:04.838Z
summary: >-
I created gatsby plugin for generating AMP (Accelerated Mobile Pages). I try
to explain how to use it.
I created gatsby plugin (called gatsby-plugin-html2amp) for generating AMP (Accelerated Mobile Pages). I try to explain how to use it.
It's easy to use 😁
Prepare Gatsby blog
then check the blog
Make it AMP !
Add plugin
Set plugin configuration to
gatsby-config.js
at bottom of file.Modify blog post template
To make your post page valid as AMP add
canonical
in<head>
src/templates/blog-post.js
then add canonical
src/templates/blog-post.js
Generate
Now you can see AMP source at
public/amp
⚡The text was updated successfully, but these errors were encountered: