AngularJS - 路由损害SEO吗?

时间:2016-10-22 14:23:00

标签: angularjs seo meta googlebot

我确信有一些技术可以使用AngularJS功能(https://prerender.io/js-seo/angularjs-seo-get-your-site-indexed-and-to-the-top-of-the-search-results/)获得更好的SEO方法。

作为一个例子,我正在开发的项目的源代码返回下一个:

<html lang="en" data-ng-app="ByTheWayApp" data-ng-controller="general">

  <head>

    <title>ByTheWay</title>
    <base href="/" />

    <meta charset="utf-8" />

    <!-- Fonts -->
    <link href="https://fonts.googleapis.com/css?family=Comfortaa:300,400,700|Courgette|Open+Sans:300,300i,400,400i,600,600i,700,700i,800,800i&amp;subset=cyrillic,cyrillic-ext,greek,latin-ext" rel="stylesheet">

    <link
    rel="stylesheet"
    type="text/css"
    href="/assets/css/bytheway.css">

    <link
    rel="stylesheet"
    type="text/css"
    ng-href="{{ templateCSS }}">

  </head>

  <body>

    <app>

      <div class="loading">
        <span>ByTheWay</span>
      </div>

      <div class="app-wrapper {{ displayClass }}" load >

        <header class="header h-3 fixed">
          <div class="inner-wrapper">

            <div class="brand wpx-7">

              <a href="/">
                <h1 class="title"><span>ByTheWay</span></h1>
                <h2 class="slogan"><span>chasing dreams worldwide</span></h2>
              </a>

            </div>

            <nav class="nav w-auto text-right aw-const" id="nav">

              <a href="/home">home</a>
              <a href="/">sign in</a>
              <a href="/"><strong>sign up</strong></a>

            </nav>

          </div>
        </header>

        <div class="page" data-ng-controller="page" data-ng-view>

          <!-- Here Go Every Page Templates using $routeProvider.when('',{}); -->

        </div>

      </div>

    </app>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.8/angular.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.8/angular-route.js"></script>
    <script type="text/javascript" src="/assets/js/bytheway.js"></script>

  </body>

</html>

<div class="page"></div>将包含Template .html文件内容,但在检查源代码时不会显示,Google Spiders / Bots抓取我的网站时会发生同样的情况吗?

PS。我还没有使用meta标签,例如描述,标签等,因为我还在定义要显示的相关内容。

谢谢你和所有最好的

0 个答案:

没有答案