skip to Main Content

When i try to use the AMP specification with my Blogger’s code i have found some errors in my console with the development mode activated:

Chrome’s console AMP validation had errors:

AMP validation had errors:
validator.js:154 http://www.xxxxxxxxxxx.com/:1:0 DISALLOWED_ATTR xmlns (see https://github.com/ampproject/amphtml/blob/master/spec/amp-html-format.md#ampd)validator.js:154 qd.error

I have seen the referenced link to know how i have to build my “header”, and i have a lot of DISALLOWED_ATTR because the Blogger’s nature of my code. what can i do to do it “AMP compliance”?:

For example, this is my “header definition” in Blogger:

<?xml version="1.0" encoding="UTF-8" ?>
<html expr:dir='data:blog.languageDirection' xmlns='http://www.w3.org/1999/xhtml' xmlns:b='http://www.google.com/2005/gml/b' xmlns:data='http://www.google.com/2005/gml/data' xmlns:expr='http://www.google.com/2005/gml/expr'>

<b:if cond='data:blog.pageType == &quot;index&quot;'>
<meta content='xxxxxxxxx es la web de ayuda al Blogger con guías para no iniciados en informática y contenido inédito en Internet para los más expertos.' name='description'/>
<meta content='blogger, guias, tutoriales, blog, seo, redes sociales, redndimiento, css, tecnologia' name='keywords'/>
<meta content='Diarios de la nube es la web de ayuda al Blogger con guías para no iniciados en informática y contenido inédito en Internet para los más expertos.' property='og:description'/>
<meta expr:content='data:blog.pageName' name='DC.title'/>
</b:if>

<meta content='width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0' name='viewport'/>

PROBLEM Nº1) The “HTML” header:

<html expr:dir='data:blog.languageDirection' xmlns='http://www.w3.org/1999/xhtml' xmlns:b='http://www.google.com/2005/gml/b' xmlns:data='http://www.google.com/2005/gml/data' xmlns:expr='http://www.google.com/2005/gml/expr'>

The xmlns=’http://www.w3.org/1999/xhtml‘ attribute it’s not admited by the validator.js. I have to change all the html header with this to pass the validator:

<html amp='' xmlns='http://www.w3.org/1999/xhtml' xmlns:b='http://www.google.com/2005/gml/b' xmlns:data='http://www.google.com/2005/gml/data' xmlns:expr='http://www.google.com/2005/gml/expr'>

I have to add amp=’ ‘ because the Blogger’s code validator doesn’t allow me to add or top level tag. And If i add the amp=’ ‘ in my html top level tag i get this error in the amp’s validator:

http://www.diariosdelanube.com/:1:0 DISALLOWED_ATTR amp validator.js:154 qd.error

is it possible to use amp code with the blogger’s specification?

What can i do to it well?.

This is a question that i post here for the request of a github’s user about amp-html with Blogger.

3

Answers


  1. AMP requires some modifications to the HTML templates that Blogger doesn’t currently support, including this one you’ve discovered.

    As such, Blogger doesn’t currently support AMP HTML.

    Login or Signup to reply.
  2. There is a potential solution, but you may not like it.

    If you downgrade to the old school templates, you can write whatever code you want.

    Revert to classic templates

    The Blogger validator is not used on the old templates:

    Write whatever head code you want

    So you can easily get rid of all the AMP-unfriendly XHTML junk and stick to simple HTML5.

    Login or Signup to reply.
  3. repress 2 css code in template by this code after you can do everything

    &lt;!-- /*<b:skin><![CDATA[*/]]></b:skin>
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search