AMP Blogger pages errors & warning is vital & very important in helping your blog posts or pages in search engines, especially with Google search. Making sure these errors or warning are quickly attended to prevents your Blogger AMP pages from being de-indexed or removed from an AMP page results.
Self explained by the AMP validator warnings, it means that some of the available AMP extension .js included in your Blogger AMP pages are not in use & the AMP tags who needs it is not available.
For example, if you are using
<amp-twitter/>
tag at your Blogger homepage but not at your post pages, then when custom-element='amp-twitter'
.js is included, these warnings will occur at your blog post pages upon validation check.Fixing AMP "amp-* extension .js script was found on this page but is unused" Warnings
Use Blogger conditional tags to target on what Blogger page type your AMP tags/components will be used. Below are some examples adding
amp-accordian
script/extension on Blogger pages:-Use amp-* extension .js script at Blogger homepage only.
<b:if cond='data:blog.url == data:blog.canonicalUrl'> <script async='async' custom-element='amp-accordion' src='https://cdn.ampproject.org/v0/amp-accordion-0.1.js'/> </b:if>
Use amp-* extension .js script at Blogger homepage & index pages only.
<b:if cond='data:blog.pageType == "index"'> <script async='async' custom-element='amp-accordion' src='https://cdn.ampproject.org/v0/amp-accordion-0.1.js'/> </b:if>
Use amp-* extension .js script at Blogger post pages only.
<b:if cond='data:blog.pageType == "item"'> <script async='async' custom-element='amp-accordion' src='https://cdn.ampproject.org/v0/amp-accordion-0.1.js'/> </b:if>
Use amp-* extension .js script at Blogger static pages only.
<b:if cond='data:blog.pageType == "static_page"'> <script async='async' custom-element='amp-accordion' src='https://cdn.ampproject.org/v0/amp-accordion-0.1.js'/> </b:if>
Use amp-* extension .js script at Blogger error pages only.
<b:if cond='data:blog.pageType == "error_page"'> <script async='async' custom-element='amp-accordion' src='https://cdn.ampproject.org/v0/amp-accordion-0.1.js'/> </b:if>
Or use the
false
conditions to include amp-* extensions
.js like so:-Use amp-* extension .js script NOT at Blogger index pages.
<b:if cond='data:blog.pageType != "index"'> <script async='async' custom-element='amp-accordion' src='https://cdn.ampproject.org/v0/amp-accordion-0.1.js'/> </b:if>
In addition, you can use new Blogger template expressions introduced by Blogger team. Below are some examples:-
Use amp-* extension .js script at Blogger static & post pages only.
<b:if cond='data:blog.pageType in {"static_page","item"}'> <script async='async' custom-element='amp-accordion' src='https://cdn.ampproject.org/v0/amp-accordion-0.1.js'/> </b:if>
Use amp-* extension .js script at Blogger pages that are not static & post pages.
<b:if cond='data:blog.pageType not in {"static_page","item"}'> <script async='async' custom-element='amp-accordion' src='https://cdn.ampproject.org/v0/amp-accordion-0.1.js'/> </b:if>
Integrating AMP HTML on Blogger templates or themes can get tricky, but it helps when you know how it is applied with. It gives blog users more control on how their contents is displayed rather than using an external web proxy services to handle their AMP integrated blog post pages where less control is given.
Blogr-AMP Blogger template framework uses a lot of this newer Blogger expressions, tags, conditions & handle the dirty work for you. Which makes conversions from your initial blog template to use valid AMP web pages much more easier & maintain able - for non coders just like you ;)
Working to get connected...
Ooops! We're having trouble connecting. Please refresh your page or contact us...