gpt4 book ai didi

amp-html - AMP with Blogger - 带有 xmlns 的 header

转载 作者:行者123 更新时间:2023-12-02 06:54:52 25 4
gpt4 key购买 nike

当我尝试将 AMP 规范与我的 Blogger 代码一起使用时,我发现在我的控制台中激活了开发模式时出现了一些错误:

Chrome 的控制台 AMP 验证有错误:

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

我已经看到引用链接以了解我必须如何构建我的“标题”,并且我有很多 DISALLOWED_ATTR 因为我的代码的 Blogger 性质。我该怎么做才能做到“AMP 合规性”?:

例如,这是我在 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'/>

问题一)“HTML”标题:

<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'>

xmlns=' http://www.w3.org/1999/xhtml ' validator.js 不承认它的属性。我必须用这个更改所有 html header 才能通过验证器:

<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'>

我必须添加 amp=' ' 因为 Blogger 的代码验证器不允许我添加或顶级标签。如果我在我的 html 顶级标签中添加 amp=' ',我会在 amp 的验证器中收到此错误:

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

是否可以按照博主的规范使用amp代码?

我能为它做些什么呢?

这是我为 request 发布的问题一位 github 用户关于 amp-html 的 Blogger。

最佳答案

AMP 需要对 Blogger 当前不支持的 HTML 模板进行一些修改,包括您发现的这个模板。

因此,Blogger 目前不支持 AMP HTML。

关于amp-html - AMP with Blogger - 带有 xmlns 的 header ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33378225/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com