Open apotox opened 5 years ago
I have a similar issue see #25 Did you solved @apotox ?
@apotox I managed to get it working by adding a "/" to the end of the path in createPages
@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 🤔
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}``, } })