amp-html

How to fix amp-auto-ads on WordPress with with Error “Cannot resize element and overflow is not available”

半世苍凉 提交于 2019-12-12 18:27:08
问题 I am using Google AdSense Auto-Ads for AMP an a WordPress Website. I placed the required snippet in the -Tag as well as the -Tag of the AMPHTML-page. Just as required by Google. And it worked quite well. Until a couple of days ago. AMP Auto-Ads stopped showing on AMP-Pages. In the console I am getting the following error: No anchor element found Cannot resize element and overflow is not available The amp-ad is showing with height="0" with seems odd to me. As shown in the screenshot and code

AMP Form to work with PhP

断了今生、忘了曾经 提交于 2019-12-12 16:41:19
问题 I am trying to setup a page with a contact form using AMP: The form has only 4 fields: Name Email: How can we help? Phone Number: Then I want that info to be sent to my email address - this is what I have in the HTML <h4>How can we help?</h4> <form class="p3 hide-inputs" method="post" action-xhr="/ampmail.php" target="_top"> <div class="ampstart-input inline-block relative mb3"> <input type="text" name="name" placeholder="Name..." required> </div> <div class="ampstart-input inline-block

Validating AMP page issue

喜夏-厌秋 提交于 2019-12-12 13:20:17
问题 I am adding amp-html to our business website. I keep getting the error below, The mandatory text (CDATA) inside tag 'head > style : boilerplate' is missing or incorrect. I am following https://www.ampproject.org/docs/reference/spec.html#required-markup but I can't seem to find this last issue in the page can someone tell me what I am missing? This is the link I am testing it with right now http://purencool.com.au/brand-derived-from-who-you-are/amp#development=1 and the attached image is the

Is it possible to use an alternate CDN for AMP as ampproject.org is blocked in China?

风格不统一 提交于 2019-12-12 11:52:45
问题 Is there a way to use an alternate CDN for including the main JavaScript file AMP needs? Can a different URL than https://cdn.ampproject.org/v0.js be used? Are there plans to open this up a bit more by allowing other CDNs that aren't blocked in China, etc? Using several of the top proxies returned from a web search, it appears that ampproject.org is blocked in China. This isn't too surprising as other Google properties are blocked. Edit: I should mention I tried copying the file and running

Link from AMP-Page to AMP-Page?

99封情书 提交于 2019-12-12 10:01:47
问题 i.e. I've some AMP-Pages amp-index.html amp-subpage1.html amp-subpage2.html amp-subpage3.html should I link from amp-index.html directly to the amp-subpages or is it better to link to the non-amp-pages? 回答1: It is up to you because in AMP documentation there is no rule for this situation or no restriction, You can link AMP page to another AMP page for fast execution. According to AMP documentation if you have only one AMP page than your amp and non amp url is same. For more detail Make your

I guess it's not possible to use web sockets, can AJAX polling be used with AMP?

ⅰ亾dé卋堺 提交于 2019-12-12 02:59:16
问题 I am looking at using AMP for a page which has a section that gets updated via websockets currently. I assume this isn't possible with AMP, so as a fallback can we use AJAX polling, or can it only be static content? 回答1: You can't use web sockets or AJAX polling in AMP. However your use case might be better handled with the upcoming amp-live-list component: https://github.com/ampproject/amphtml/issues/2762 回答2: Only static content. You could add a button to re-direct to a non-AMP JS-based

How to redirect amp content to normal mode

送分小仙女□ 提交于 2019-12-12 02:45:38
问题 I am totally new here, this is my first question here, recently I have enabled amp option in my site, for some reason I want to disable it. I did this by amp plugin, when I deactivated the plugin all my amp contents ar showing 404 error, one more thing all my contents aren't indexed as amp content, If I deactivate the plugin my amp contents are showing 404 page error, is their any way to redirect my amp contents to normal mode like; mysite.com/how-to-design/amp and this will redirect to

Creating a contact form using AMP-html with PHP

末鹿安然 提交于 2019-12-12 01:39:42
问题 I have been trying to create a contact form using AMP-html with php. I just cannot get it to work. When I click the button, the error message shows from the amp-mustache template (but without the name field) - but I cannot see what the actual error is. I have been looking at the amp documentation and this question, but cannot it get to work. AMP form submitting with post. I have used this as a basis for my code, and I cannot get it to work. I have moved the success template into the form and

AMP validation error “The mandatory attribute 'amp-custom' is missing in tag 'style amp-custom'…”

本小妞迷上赌 提交于 2019-12-11 18:12:38
问题 A web page has the following AMP validation error: The mandatory attribute 'amp-custom' is missing in tag 'style amp-custom'. (see https://www.ampproject.org/docs/guides/author-develop/responsive/style_pages) I searched the page source, and could not find "amp-custom". In other words, the page does not have tag 'style amp-custom'. Could anyone offer a hint on a possible cause of this error? 回答1: I'm on my phone so bear with me here... amp-custom is where you include your custom CSS. It goes

sump up of setting up amp-jekyll in my project

China☆狼群 提交于 2019-12-11 15:02:32
问题 I am working on a jekyll project and already asked some questions on stackoverflow and jekyll talks site. This post is a sump up for the issue I have about setting up amp-jekyll. amp-Jekyll is a jekyll plugin. The full documentation is at this adress : https://github.com/juusaw/amp-jekyll The tree of my project is the following My Version of jekyll is jekyll-3.6.2 I installed the plugin using the Gemfile (gem "amp-jekyll", "1.0.2" # installed). I checked that the plugin is well installed.