⚡⚛ AMP HTML, Next.js, React, styled-components, GraphQL — The most trendy website boilerplate possible.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.circleci Add CircleCI config Apr 8, 2018
pages Update pages Apr 8, 2018
static Switch to Next.js Sep 30, 2017
.babelrc Add styled-components Sep 30, 2017
.gitignore Switch to Next.js Sep 30, 2017
README.md Update README.md Apr 8, 2018
package-lock.json Update Dependencies Apr 8, 2018
package.json Update Dependencies Apr 8, 2018
yarn.lock Update yarn.lock Oct 26, 2017

README.md

ampreact

⚡⚛ AMP HTML, Next.js, React, styled-components, GraphQL — The most trendy website boilerplate possible.

About

The core of ampreact is built on Next.js, used for all the routing and serving of pages. For styling, styled-components makes it easy—with just a small modification to the rendering of the <style /> tags generated, it works nicely with AMP HTML. Finally, react-amphtml is used for rendering all of the AMP HTML built-ins, extensions, and the <script /> tags needed to use them.

The pages generated should all by properly validated by AMP HTML 💯

Usage

All the usage and benefits of Next.js are available to ampreact.

  • Installation:

    npm install
  • Development:

    npm run dev
  • Production:

    npm run build
    npm run start

Example & Validation

An example of ampreact can be seen here: https://ampreact-szogszfmrw.now.sh/

For proof of validation, either:

  1. Append #development=1 to the URL and check the console for errors

  2. Paste the page HTML into https://validator.ampproject.org/#url=https%3A%2F%2Fampreact-szogszfmrw.now.sh%2F

Deployment

Because ampreact is built on top of Next.js it is simple to deploy to Now or any other cloud infrastructure providers.

Deploy to now