Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

duplicated /amp/amp in the generated amp html #26

Open
apotox opened this issue Sep 2, 2019 · 3 comments
Open

duplicated /amp/amp in the generated amp html #26

apotox opened this issue Sep 2, 2019 · 3 comments

Comments

@apotox
Copy link

apotox commented Sep 2, 2019

Hi,

after a successfully build, new AMP pages have been generated and accessible using "http://example.com/page-title/amp ".

but the AMP tag is missing in the
<html lang="en">

the view-source of http://example.com/page-title/amp contains:

<link rel="amphtml" href="..../amp/amp"/>

gatsby-config like:
{ resolve: "gatsby-plugin-amp", options: { canonicalBaseUrl: 'http://example.com/', components: ['amp-form'], excludedPaths: ['/404*', '/'], pathIdentifier: '/amp/', relAmpHtmlPattern: '{{canonicalBaseUrl}}{{pathname}}{{pathIdentifier}}', useAmpClientIdApi: true, } }

gatsby-node like:

createPage({ path: ``${node.path}/amp``, component: bookAmpTemplate, context: { slug: ``${node.path}``, } })

@kalwalt
Copy link

kalwalt commented Sep 21, 2019

I have a similar issue see #25 Did you solved @apotox ?

@jonoirwinrsa
Copy link

jonoirwinrsa commented Oct 13, 2019

@apotox I managed to get it working by adding a "/" to the end of the path in createPages

@DanOnCall
Copy link

@jonoirwinrsa Saved the day... Been hours trying to make these AMP pages work! That did the trick. Thank you!

I still have to figure out how to make them valid pages 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants