# AMP pages non-valid

**URL:** <https://forum.ghost.org/t/amp-pages-non-valid/21250>\
**Category:** Installation\
**Created:** [March 26, 2021, 2:41pm UTC](https://forum.ghost.org/t/amp-pages-non-valid/21250 "2021-03-26T14:41:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrii](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/andrii/32/11786_2.png) [@andrii](https://forum.ghost.org/u/andrii)\
**Post date:** [March 26, 2021, 2:41pm UTC](https://forum.ghost.org/t/amp-pages-non-valid/21250/1 "2021-03-26T14:41:03Z")

</div>

I have enabled Ghost AMP pages - but seems all of them are non-valid in Search Console.

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

Seems the issue is with this code snippet.

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

Any ideas how to solve this error? Or how to edit AMP code in Ghost?

 ![Screen Shot 2021-03-26 at 3.39.32 PM](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/2X/d/d6ae875ae392f202f651a9f4bb26f233f0454ff6.png) ![Screen Shot 2021-03-26 at 3.39.58 PM](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/2X/9/96d88922f63de541c1a6afb2e253f640c4ca7238.png)

---

<div class="post-metadata">

**Author:** ![Kevin](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kevin/32/32_2.png) [@Kevin](https://forum.ghost.org/u/Kevin)\
**Post date:** [March 26, 2021, 3:01pm UTC](https://forum.ghost.org/t/amp-pages-non-valid/21250/2 "2021-03-26T15:01:29Z")

</div>

@andrii please upgrade your version of Ghost, this bug was fixed in 4.1.0 (latest at time of posting is 4.1.2) 🙂

---

<div class="post-metadata">

**Author:** ![andrii](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/andrii/32/11786_2.png) [@andrii](https://forum.ghost.org/u/andrii)\
**Post date:** [March 27, 2021, 3:44pm UTC](https://forum.ghost.org/t/amp-pages-non-valid/21250/3 "2021-03-27T15:44:10Z")

</div>

Thanks @Kevin!

After update, most AMP pages passed the test. 🎉

However, fyi: if I embed giphy in posts - AMP doesn’t pass validation.

 ![Screen Shot 2021-03-27 at 9.03.44 PM](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/2X/5/570fc34a73694a80a11759e3ce1d514014287c49.png)

Also, if you embed e.g. SoundCloud - still doesn’t pass AMP validation.

So, seems there should be another fix…

---

<div class="post-metadata">

**Author:** ![andrii](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/andrii/32/11786_2.png) [@andrii](https://forum.ghost.org/u/andrii)\
**Post date:** [March 29, 2021, 12:33pm UTC](https://forum.ghost.org/t/amp-pages-non-valid/21250/4 "2021-03-29T12:33:29Z")

</div>

@Kevin also, so an update after I submitted validation in Search Console - pages are valid, but still with warnings.  
This is the issue: Missing field “image” in AMP.

 ![Screen Shot 2021-03-29 at 2.30.48 PM](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/2X/d/ddc911e05d6f0067954ab6f5089c796b53b05699.png)

Therefore, Ghost AMP won’t show up in some rich results in Google Search.
