Giter Site home page Giter Site logo

dfrankland / ampreact Goto Github PK

View Code? Open in Web Editor NEW
229.0 229.0 29.0 2.28 MB

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

Home Page: https://ampreact.dfrankland.now.sh/

JavaScript 24.39% TypeScript 75.61%

ampreact's People

Contributors

dfrankland avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ampreact's Issues

The tag 'script' is disallowed except in specific forms.

Hi,
I cloned the repo and ran the npm server with npm start.
When I loaded the source html into the AMP validator (https://validator.ampproject.org/) I see that it fails with error message The tag 'script' is disallowed except in specific forms.

Specifically, it's a <script> tag that shows up inside of <body>. Seems like this <script> tag wraps around all of the body content. Do you know how we can resolve this?

Thanks in advance!

PS I got the source html by going to view-source:localhost:3001

Adding React component

Very cool little project. I was wondering what would be the best way to add a custom React component within a page? It looks like all React is used as a templating engine only and the components have no code executing.

I hope my question is clear.

Thank you :)

The support of application/ld+json in head file

When i write application/ld+json script for search engines our html don't have clue about it.
Why?

import Head from 'next/head';

<Head>
   <script type="application/ld+json">
          {{
            '@context': 'http://schema.org',
            '@type': 'NewsArticle',
            mainEntityOfPage: `${product.host}/index/index.html`,
            headline,
            datePublished,
            dateModified,
            description,
            author: {
              '@type': 'Person',
              name: authorName
            },
            publisher: {
              '@type': 'Organization',
              name: 'Test',
              logo: {
                '@type': 'ImageObject',
                url: getImageUrl('static/imgs/assets/Header/logo-green.png'),
                width: 350,
                height: 135
              }
            },
            image: {
              '@type': 'ImageObject',
              url: getImageUrl(imageUrl),
              height: 480,
              width: 412
            }
          }}
   </script>
</Head>

how to get window.location.href?

When I console.log(window.location.href) I get an error saying window is not defined. I know node doesn't support that..Can you please advise a work around.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.