AMP-html页面未按预期显示在Google搜索中 [英] AMP-html page not displaying as intended in Google Search

查看:94
本文介绍了AMP-html页面未按预期显示在Google搜索中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在阅读AMP的可能性,但我似乎无法理解为什么我的页面无法像Google在其演示中那样显示(请参见 http://g.co/amp ).我的常规页面是这样的:

I have been reading through the possibilities of AMP, but I cannot seem to grasp why my page is not showing like Google shows it in their demo (see http://g.co/amp). My regular page is this:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>An example of an AMP Project; a part of a self-writen paper about maintainability</title>
        <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
        <meta name="language" content="NL"/>
        <meta name="description" content="Every software engineering project has a certain degree of maintainability. Period.">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
        <link rel="amphtml" href="http://amptest.millerpreview.nl/indexamp.html">
        <link rel="canonical" href="http://amptest.millerpreview.nl/index.html">
    </head>

    <body>
        <header>
            <nav>
                <ul>
                    <li><a href="/">Home</a></li>
                    <li><a href="/">Another page</a></li>
                    <li><a href="/">Another other page</a></li>
                </ul>
            </nav>
            <h1>Welcome!</h1>
            <img src='http://portal.tugraz.at/portal/page/portal/Files/internationales/Welcome_Center/Welcome_Fotolia_62393747_XXL.jpg' />
        </header>

        <h2>Maintainability of an Open Source Software Engineering Project</h2>
        <p>
            <b>Every software engineering project has a certain degree of maintainability which is directly derivable to the quality of the software, the complexity of the code, the amount and quality of the documentation and the understandability. In this paper, the maintainability of a randomly chosen open source Android application called TeamTalk is measured with the SIG Maintainability Model, created by the Software Improvement Group. The conclusion of the paper is an advice on improving maintainability towards the creators of this application.</b>
        </p>
        <h3>Introduction</h3>
        <p>
            Every software engineering project has a certain degree of maintainability which is directly derivable to the quality of the software, the complexity of the code, the amount and quality of the documentation and the understandability \cite{Heitlager07}. Maintainability is an often forgotten software quality attribute \cite{Radatz90, Swanson76} but a rather important one. Approximately 40 - 80\% of software`s life cycle is spent on maintainability \cite{Coleman94, Dubey11, Kiewkanya05}. Maintaining an application will cost less time and thus less money if the maintainability is given proper attention.<br />
            <br />
            The goal of this paper is to gain insight into the maintainability of a randomly chosen open source application; in this case, it is the Android \cite{Android} app TeamTalk \cite{TeamTalk}. For this, we will measure the software quality attributes \cite{ISO} of maintainability; the analyzability, changeability, stability and testability.<br />
            <br />
            In section 2 we will give more insights about the background of the app TeamTalk and about what the SIG Maintainability Model is. In section 3 the used tools and the approach, based on the SIG Maintainability Model, will be discussed. Section 4 shows and discusses the results, on which an overall adice is given in section 5. The paper will be concluded with a summary of the results and what our advice is for the TeamTalk developers.<br />
        </p>

        <footer>
            <img src='http://www.greetingsfromheart.com/images/bye_bye/bye_bye.gif' />
        </footer>
    </body>
</html>

我的AMP html页面是这样的:

And my AMP html page is like this:

<!doctype html>
<html amp lang="en">
  <head>
    <meta charset="utf-8">
    <title>Hello, AMPs</title>
    <link rel="canonical" href="http://amptest.millerpreview.nl/index.html" />
    <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
    <meta name="description" content="Every software engineering project has a certain degree of maintainability. Periods.">
    <script type="application/ld+json">
  {
    "@context": "http://schema.org",
    "@type": "ScholarlyArticle",
    "headline": "Maintainability of an Open Source Software Engineering Project",
    "datePublished": "2015-10-07T12:02:41Z",
    "image": [
      "logo.jpg"
    ]
  }
</script>
    <style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
    <style amp-custom>
        main {
            margin: 0 auto;
            max-width: 620px;
        }
    </style>
    <script async src="https://cdn.ampproject.org/v0.js"></script>
  </head>
    <body>
        <main>
            <header>
                <nav>
                    <ul>
                        <li><a href="/">Home</a></li>
                        <li><a href="/">Another page</a></li>
                        <li><a href="/">Another other page</a></li>
                    </ul>
                </nav>
                <h1>Welcome!</h1>
                <amp-img src='http://portal.tugraz.at/portal/page/portal/Files/internationales/Welcome_Center/Welcome_Fotolia_62393747_XXL.jpg' width="325" height="200"/>
            </header>
            <h1>Maintainability of an Open Source Software Engineering Project</h1>
            <p>
                <b>Every software engineering project has a certain degree of maintainability which is directly derivable to the quality of the software, the complexity of the code, the amount and quality of the documentation and the understandability. In this paper, the maintainability of a randomly chosen open source Android application called TeamTalk is measured with the SIG Maintainability Model, created by the Software Improvement Group. The conclusion of the paper is an advice on improving maintainability towards the creators of this application.</b>
            </p>
            <h3>Introduction</h3>
            <p>
                Every software engineering project has a certain degree of maintainability which is directly derivable to the quality of the software, the complexity of the code, the amount and quality of the documentation and the understandability \cite{Heitlager07}. Maintainability is an often forgotten software quality attribute \cite{Radatz90, Swanson76} but a rather important one. Approximately 40 - 80\% of software`s life cycle is spent on maintainability \cite{Coleman94, Dubey11, Kiewkanya05}. Maintaining an application will cost less time and thus less money if the maintainability is given proper attention.<br />
                <br />
                The goal of this paper is to gain insight into the maintainability of a randomly chosen open source application; in this case, it is the Android \cite{Android} app TeamTalk \cite{TeamTalk}. For this, we will measure the software quality attributes \cite{ISO} of maintainability; the analyzability, changeability, stability and testability.<br />
                <br />
                In section 2 we will give more insights about the background of the app TeamTalk and about what the SIG Maintainability Model is. In section 3 the used tools and the approach, based on the SIG Maintainability Model, will be discussed. Section 4 shows and discusses the results, on which an overall adice is given in section 5. The paper will be concluded with a summary of the results and what our advice is for the TeamTalk developers.<br />
            </p>
        </main>
    </body>
</html>

它在Google搜索和AMP演示中都显示为这样.我知道我的页面已被Google缓存: https://cdn.ampproject .org/c/amptest.millerpreview.nl/indexamp.html .在本地,我的AMP已经过验证,但是在缓存版本中,它说脚本标签无效,即使那是AMP引擎javascript,也应该被认为是有效的.

It shows like this in the Google search AND in the AMP demo. I know my page is cached by Google: https://cdn.ampproject.org/c/amptest.millerpreview.nl/indexamp.html. Locally, my AMP is validated, but at the cached version it says that the script tag is not valid even though that is the AMP engine javascript, which should be deemed valid.

我的问题;这在Google搜索中还没有实现吗?还是我做错了什么?

My question; is this not implemented yet in Google searches, or am I doing something wrong?

我的Google搜索结果如下:

My Google search result looks like this:

推荐答案

目前AMP页面的使用受到限制.例如,Google搜索结果不会显示等效的AMP而不是您的页面.

The use of AMP pages is limited at present. Google search results for example will not display the AMP equivalent instead of your page.

实施它们的一个地方是在热门故事"轮播中.该轮播将链接到AMP页面,并在常规搜索结果中显示另外(该链接将继续链接到非AMP版本-如上所述不再是真的).这只会显示NewsArticle发布的页面,并且仅在Google认为搜索可能需要最新新闻列表时才显示(因此,对贵公司的搜索不太可能显示此信息).最近搜索新闻中的某些内容,您会在文章的某些文章旁边看到热门故事"轮播和闪电.请注意,这尚未在所有地方推出,因此如果您没有看到此内容,请尝试使用Google.com而不是Google.nl.

One place they are implemented is in a carousel of "Top Stories". This carousel will link to the AMP pages and will display in addition to the regular search results (which will continue to link to the non-AMP version - not true anymore as per above). This will only display pages for NewsArticle postings, and only when the search is deemed by Google to be likely to require a list of recent news (so a search for your company is unlikely to display this). Do a search on something in the news recently and you should see a Top Stories carousel and a the lightning bolt next to some article of the articles. Note this hasn't yet rolled out everywhere so try Google.com rather than Google.nl if you're not seeing this.

因此,目前实施AMP的主​​要好处是对新闻机构.

So the main benefit to implementing AMP at present is for news organisations.

这会改变吗?很可能. Twitter表示他们将开始使用AMP版本, Google可能会更多地使用它(尽管不确定它们是否会取代主要的搜索列表),其他人可能会紧随其后.

Will this change? It's likely. Twitter have stated they will start to use the AMP versions, Google may use it more (though not sure if they will ever replace the main search listings) and others may follow.

关于您在缓存版本中使用script标签的问题,我没有看到该问题.请注意,缓存版本不是经常更新,因此不是实时"的.因此,如果出现错误,请访问缓存的URL,它将加载该URL并显示错误.但是,如果您随后修复错误并刷新了缓存的URL,它仍然会显示错误.您只需要等待一两天,直到它脱离缓存,然后重试.他们正在研究一种更好的方法来控制此问题(尽管似乎已经解决了跟踪此问题的问题).

As to your problem with the script tag in the cached version I don't see that issue. Note that the cached version isn't updated very often so it's not "live". So if you have an error, visit the cached URL, it will load it and display the error. However if you then fix the error and refreshed the cached URL it will still show the error. You just need to wait a day or two until it falls out of the cache and try again. They're working on a better way to control this (though seemed to have closed the issue tracking this).

自撰写此答案以来,发生了很多变化. 现在显示的放大器页面主要搜索结果-至少对于移动设备而言.因此,除了新闻机构之外,现在还有好处.但是,答案将保留与当时回答用户问题的方式相同.

A lot has changed since the time of writing this answer. Now amp pages DO show in main search results - at least for mobile. So there is now a benefit beyond news organisations. However will leave the answer as is as it did answer the user's question at the time.

这篇关于AMP-html页面未按预期显示在Google搜索中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆