Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AMP with Blogger - The header with xmlns #760

Closed
miguelcolomer opened this issue Oct 27, 2015 · 3 comments
Closed

AMP with Blogger - The header with xmlns #760

miguelcolomer opened this issue Oct 27, 2015 · 3 comments

Comments

@miguelcolomer
Copy link

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: ´´´<script async='true' src='https://cdn.ampproject.org/v0.js' development='true'></script>´´´ :

AMP validation had errors:
validator.js:154 http://www.diariosdelanube.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='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.' 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 <html amp> or <html ⚡> 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?

Thank you very much!!!

@jmadler
Copy link
Contributor

jmadler commented Oct 27, 2015

Can you post to StackOverflow with the "amp-html" tag and I'll answer there? Thanks!

@jmadler jmadler closed this as completed Oct 27, 2015
@miguelcolomer
Copy link
Author

@miguelcolomer
Copy link
Author

I don't have any response about this... someone could help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants