4.0 upgrade causes AMP errors in Google Search Console

My site is being hosted via Ghost Pro, and I updated it to v4.0.

I’ve had an email this morning from Google search console about AMP issues being detected. These started from the upgrade to 4.0 and appear related to a style tag added to the document head.

Message from Google:

Only amp-boilerplate and amp-custom ‘style’ tags are allowed, and only in the document head.

The “offending code” according to Google is:

<style>:root {--ghost-accent-color: #15171A;}</style>

Please use the search before posting to avoid duplicate topics :slight_smile:

Closing as this a duplicate of All previously valid AMP pages became invalid with latest Ghost 4 release