2016-03-25 3 views
2

Я читал о возможностях AMP, но я не могу понять, почему моя страница не отображается, как показывает Google в своей демонстрации (см. http://g.co/amp). Моя регулярная страница это:AMP-html-страница не отображается в Google Search

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

И мой HTML-AMP, как это:

<!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 проверен, но в кэшированной версии он говорит, что тег скрипта недействителен, хотя это javascript с AMP-движком, который должен считаться действительным.

Мой вопрос; это еще не реализовано в поисковых системах Google, или я делаю что-то неправильно?

Мой результат поиска Google выглядит следующим образом:

Google search result

+0

Пожалуйста, не смотрите на контент; Мне просто нужно было быстро привести пример, который так прост, как может быть. Я даже беззастенчиво добавил самые уродливые изображения, которые я нашел в Google, только для тестирования. –

ответ

4

Использование страниц AMP в настоящее время ограничено. Например, в результатах поиска Google не будет отображаться эквивалент AMP вместо вашей страницы.

Одно место, которое они реализованы, находится в карусели «Лучшие истории». Эта карусель будет ссылаться на страницы AMP и покажет обычным результатам поиска (который будет продолжать ссылаться на версию без AMP - Edit: not true больше, как указано выше). Это будет отображаться только на страницах для новостей NewsArticle, и только тогда, когда Google считает, что поиск может потребовать список последних новостей (так что поиск вашей компании вряд ли отобразит это). Сделайте поиск по чему-то в новостях в последнее время, и вы должны увидеть карусель Top Stories и молнию рядом с какой-то статьей статей. Обратите внимание, что это еще не развернулось повсюду, поэтому попробуйте Google.com, а не Google.nl, если вы этого не видите.

Таким образом, основная польза для внедрения AMP в настоящее время для новостных организаций.

Будет ли это изменено? Скорее всего. Twitter have stated they will start to use the AMP versions, Google может использовать его больше (хотя не уверен, что они когда-либо заменят основные поисковые объявления), а другие могут следовать.

Что касается вашей проблемы с тегом скрипта в кешированной версии, я не вижу этой проблемы. Обратите внимание, что кешированная версия не обновляется очень часто, поэтому она не «живая». Поэтому, если у вас есть ошибка, посетите URL-адрес кэширования, он загрузит его и отобразит ошибку. Однако, если вы затем исправите ошибку и обновите кешированный URL-адрес, она все равно покажет ошибку. Вам просто нужно подождать один-два дня, пока он не выпадет из кэша и повторите попытку. Они работают над лучшим способом контроля над этим (хотя, казалось, closed the issue tracking this).

Редактировать: С момента написания этого ответа многое изменилось. Now amp pages DO show in main search results - по крайней мере для мобильных устройств. Таким образом, теперь есть преимущество вне новостных организаций. Однако ответ останется таким же, как и в тот момент, когда он ответил на вопрос пользователя.

+0

Ницца, спасибо за огромное объяснение! У вас есть источники для ваших заявлений? Я также напишу для блога об AMP, поэтому я мог бы вернуть свои данные вверх :-) –

+1

Эта ссылка показывается только для топ-историй: https://googleblog.blogspot.com/2016/02/amping- до-в-подвижной search.html. Отдых - это предположение, кроме ссылок, которые я уже дал. Вам может быть интересно узнать мои собственные сообщения в блоге: https://www.tunetheweb.com/blog/do-we-really-need-google-amp/ и https://www.tunetheweb.com/blog/implementing -асфальтированные-мобильные страницы/ –

+0

Спасибо за отличную помощь! Я обязательно просмотрю ваши сообщения в блоге. –

3

Хорошая вещь, чтобы использовать это Structured Data Testing tool и проверить требования, чтобы показать в Google Искать здесь:

https://developers.google.com/structured-data/carousels/top-stories#top_stories_with_amp_in_google_search

It похоже, одна потенциальная проблема заключается в том, что вы используете ScholarlyArticle, но на данный момент Google только явно перечисляет статью, статью новостей или блогпостинг. Вы можете попробовать использовать более общий тип статьи и посмотреть, работает ли это.

Если это не сработает, то хорошее место для получения помощи находится в Webmaster Central Forums и в AMP Error Reports в Search Console.

2

Если вы имеете в виду страницы, на cdn.ampproject.org не проверки, другими словами https://cdn.ampproject.org/c/amptest.millerpreview.nl/indexamp.html#development=1 показывая ошибки в консоли разработчика, это предназначено. cdn.ampproject.org перезаписывает URL-адрес JavaScript для специально версии, которая имеет более длительный срок службы кеша. Это означает, что преобразованный документ больше не действителен, но все в порядке. Ваш документ по-прежнему считается действительным.

См. https://cdn.ampproject.org/c/example.com/, чтобы получить пример того, что произойдет, если ваша страница была фактически недействительной AMP.

Смежные вопросы