Umbraco使用Google AMP样式样板文件分析错误

Umbraco使用Google AMP样式样板文件分析错误,umbraco,amp-html,Umbraco,Amp Html,正如标题所说,我正在尝试将下面的MasterPage.cshtml转换为AMP页面。我遵循AMP指南,但当我添加样板样式时,页面会出现解析错误。我已经在代码下面添加了错误作为屏幕上限。我在网上找到的所有指南都声明AMP中的代码必须没有空格,我已经这样做了。我有点不明白为什么它会在样式属性中的样式规则上抛出错误 <title>@ViewBag.MetaPageTitle</title> <meta name="viewport" content="width=dev

正如标题所说,我正在尝试将下面的MasterPage.cshtml转换为AMP页面。我遵循AMP指南,但当我添加样板样式时,页面会出现解析错误。我已经在代码下面添加了错误作为屏幕上限。我在网上找到的所有指南都声明AMP中的代码必须没有空格,我已经这样做了。我有点不明白为什么它会在样式属性中的样式规则上抛出错误

<title>@ViewBag.MetaPageTitle</title>

<meta name="viewport" content="width=device-width,minimum-scale=1">
<meta property="og:type" content="website" />
<meta property="og:image" content="@hostURL/Images/fb-share-icon.jpg" />

<meta name="description" content="@ViewBag.MetaDescription">
<meta name="keywords" content="@ViewBag.MetaKeywords">
<meta property="og:title" content="@ViewBag.OpenGraphTitle" />
<meta property="og:description" content="@ViewBag.OpenGraphDescription" />

<link rel="shortcut icon" href="@hostURL/favicon.ico">

<!-- <link rel="stylesheet" href="//f.fontdeck.com/s/css/dHB7e0dw8S61Pb8GIfIJeoCm92Q/@simpleHostURL/43285.css" type="text/css" /> -->

@Html.Raw(@Html.RenderCssHere())

<!-- Umbraco Rich Text Editior Styles -->
<link rel="stylesheet" href="css/textStyles.css" type="text/css" />

<!--[if gt IE 8]><!-->
<link rel="stylesheet" href="css/hover.css" type="text/css" />
<!--<![endif]-->

<!--[if IE 8]>
        <link rel="stylesheet" href="css/ie8.css">
        <script src="~/scripts/respond.min.js"></script>
        <script src="~/scripts/fontello.ie8.fix.js"></script>
    <![endif]-->

@Umbraco.RenderMacro("CanonicalUrl")




<script async src="https://cdn.ampproject.org/v0.js"></script>
    <script async custom-element="amp-carousel" src="https://cdn.ampproject.org/v0/amp-carousel-0.1.js"></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>
翁布拉科v6.1.6

<title>@ViewBag.MetaPageTitle</title>

<meta name="viewport" content="width=device-width,minimum-scale=1">
<meta property="og:type" content="website" />
<meta property="og:image" content="@hostURL/Images/fb-share-icon.jpg" />

<meta name="description" content="@ViewBag.MetaDescription">
<meta name="keywords" content="@ViewBag.MetaKeywords">
<meta property="og:title" content="@ViewBag.OpenGraphTitle" />
<meta property="og:description" content="@ViewBag.OpenGraphDescription" />

<link rel="shortcut icon" href="@hostURL/favicon.ico">

<!-- <link rel="stylesheet" href="//f.fontdeck.com/s/css/dHB7e0dw8S61Pb8GIfIJeoCm92Q/@simpleHostURL/43285.css" type="text/css" /> -->

@Html.Raw(@Html.RenderCssHere())

<!-- Umbraco Rich Text Editior Styles -->
<link rel="stylesheet" href="css/textStyles.css" type="text/css" />

<!--[if gt IE 8]><!-->
<link rel="stylesheet" href="css/hover.css" type="text/css" />
<!--<![endif]-->

<!--[if IE 8]>
        <link rel="stylesheet" href="css/ie8.css">
        <script src="~/scripts/respond.min.js"></script>
        <script src="~/scripts/fontello.ie8.fix.js"></script>
    <![endif]-->

@Umbraco.RenderMacro("CanonicalUrl")




<script async src="https://cdn.ampproject.org/v0.js"></script>
    <script async custom-element="amp-carousel" src="https://cdn.ampproject.org/v0/amp-carousel-0.1.js"></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>

<title>@ViewBag.MetaPageTitle</title>

<meta name="viewport" content="width=device-width,minimum-scale=1">
<meta property="og:type" content="website" />
<meta property="og:image" content="@hostURL/Images/fb-share-icon.jpg" />

<meta name="description" content="@ViewBag.MetaDescription">
<meta name="keywords" content="@ViewBag.MetaKeywords">
<meta property="og:title" content="@ViewBag.OpenGraphTitle" />
<meta property="og:description" content="@ViewBag.OpenGraphDescription" />

<link rel="shortcut icon" href="@hostURL/favicon.ico">

<!-- <link rel="stylesheet" href="//f.fontdeck.com/s/css/dHB7e0dw8S61Pb8GIfIJeoCm92Q/@simpleHostURL/43285.css" type="text/css" /> -->

@Html.Raw(@Html.RenderCssHere())

<!-- Umbraco Rich Text Editior Styles -->
<link rel="stylesheet" href="css/textStyles.css" type="text/css" />

<!--[if gt IE 8]><!-->
<link rel="stylesheet" href="css/hover.css" type="text/css" />
<!--<![endif]-->

<!--[if IE 8]>
        <link rel="stylesheet" href="css/ie8.css">
        <script src="~/scripts/respond.min.js"></script>
        <script src="~/scripts/fontello.ie8.fix.js"></script>
    <![endif]-->

@Umbraco.RenderMacro("CanonicalUrl")




<script async src="https://cdn.ampproject.org/v0.js"></script>
    <script async custom-element="amp-carousel" src="https://cdn.ampproject.org/v0/amp-carousel-0.1.js"></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>

<title>@ViewBag.MetaPageTitle</title>

<meta name="viewport" content="width=device-width,minimum-scale=1">
<meta property="og:type" content="website" />
<meta property="og:image" content="@hostURL/Images/fb-share-icon.jpg" />

<meta name="description" content="@ViewBag.MetaDescription">
<meta name="keywords" content="@ViewBag.MetaKeywords">
<meta property="og:title" content="@ViewBag.OpenGraphTitle" />
<meta property="og:description" content="@ViewBag.OpenGraphDescription" />

<link rel="shortcut icon" href="@hostURL/favicon.ico">

<!-- <link rel="stylesheet" href="//f.fontdeck.com/s/css/dHB7e0dw8S61Pb8GIfIJeoCm92Q/@simpleHostURL/43285.css" type="text/css" /> -->

@Html.Raw(@Html.RenderCssHere())

<!-- Umbraco Rich Text Editior Styles -->
<link rel="stylesheet" href="css/textStyles.css" type="text/css" />

<!--[if gt IE 8]><!-->
<link rel="stylesheet" href="css/hover.css" type="text/css" />
<!--<![endif]-->

<!--[if IE 8]>
        <link rel="stylesheet" href="css/ie8.css">
        <script src="~/scripts/respond.min.js"></script>
        <script src="~/scripts/fontello.ie8.fix.js"></script>
    <![endif]-->

@Umbraco.RenderMacro("CanonicalUrl")




<script async src="https://cdn.ampproject.org/v0.js"></script>
    <script async custom-element="amp-carousel" src="https://cdn.ampproject.org/v0/amp-carousel-0.1.js"></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>
@ViewBag.MetaPageTitle
@Html.Raw(@Html.rendercshere())
@Umbraco.RenderMacro(“规范URL”)
body{-webkit动画:-amp start 8s steps(1,end)0s1 normal tweet;-moz动画:-amp start 8s steps(1,end)0s1 normal tweet;-ms动画:-amp start 8s steps(1,end)0s1 normal tweet}@-webkit关键帧-amp start{从{可见性:隐藏}到{可见性:可见}}@-moz关键帧-amp start{from{可见性:隐藏}

<title>@ViewBag.MetaPageTitle</title>

<meta name="viewport" content="width=device-width,minimum-scale=1">
<meta property="og:type" content="website" />
<meta property="og:image" content="@hostURL/Images/fb-share-icon.jpg" />

<meta name="description" content="@ViewBag.MetaDescription">
<meta name="keywords" content="@ViewBag.MetaKeywords">
<meta property="og:title" content="@ViewBag.OpenGraphTitle" />
<meta property="og:description" content="@ViewBag.OpenGraphDescription" />

<link rel="shortcut icon" href="@hostURL/favicon.ico">

<!-- <link rel="stylesheet" href="//f.fontdeck.com/s/css/dHB7e0dw8S61Pb8GIfIJeoCm92Q/@simpleHostURL/43285.css" type="text/css" /> -->

@Html.Raw(@Html.RenderCssHere())

<!-- Umbraco Rich Text Editior Styles -->
<link rel="stylesheet" href="css/textStyles.css" type="text/css" />

<!--[if gt IE 8]><!-->
<link rel="stylesheet" href="css/hover.css" type="text/css" />
<!--<![endif]-->

<!--[if IE 8]>
        <link rel="stylesheet" href="css/ie8.css">
        <script src="~/scripts/respond.min.js"></script>
        <script src="~/scripts/fontello.ie8.fix.js"></script>
    <![endif]-->

@Umbraco.RenderMacro("CanonicalUrl")




<script async src="https://cdn.ampproject.org/v0.js"></script>
    <script async custom-element="amp-carousel" src="https://cdn.ampproject.org/v0/amp-carousel-0.1.js"></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>

<title>@ViewBag.MetaPageTitle</title>

<meta name="viewport" content="width=device-width,minimum-scale=1">
<meta property="og:type" content="website" />
<meta property="og:image" content="@hostURL/Images/fb-share-icon.jpg" />

<meta name="description" content="@ViewBag.MetaDescription">
<meta name="keywords" content="@ViewBag.MetaKeywords">
<meta property="og:title" content="@ViewBag.OpenGraphTitle" />
<meta property="og:description" content="@ViewBag.OpenGraphDescription" />

<link rel="shortcut icon" href="@hostURL/favicon.ico">

<!-- <link rel="stylesheet" href="//f.fontdeck.com/s/css/dHB7e0dw8S61Pb8GIfIJeoCm92Q/@simpleHostURL/43285.css" type="text/css" /> -->

@Html.Raw(@Html.RenderCssHere())

<!-- Umbraco Rich Text Editior Styles -->
<link rel="stylesheet" href="css/textStyles.css" type="text/css" />

<!--[if gt IE 8]><!-->
<link rel="stylesheet" href="css/hover.css" type="text/css" />
<!--<![endif]-->

<!--[if IE 8]>
        <link rel="stylesheet" href="css/ie8.css">
        <script src="~/scripts/respond.min.js"></script>
        <script src="~/scripts/fontello.ie8.fix.js"></script>
    <![endif]-->

@Umbraco.RenderMacro("CanonicalUrl")




<script async src="https://cdn.ampproject.org/v0.js"></script>
    <script async custom-element="amp-carousel" src="https://cdn.ampproject.org/v0/amp-carousel-0.1.js"></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>

(功能(w、d、s、l、i){
w[l]=w[l]| |[];
w[l]。推({
“gtm.start”:新日期().getTime(),
事件:“gtm.js”
});
var f=d.getElementsByTagName[0],
j=d.createElement,
dl=l!=“数据层”?“&l=”+l:”;
j、 异步=真;
j、 src=
'//www.googletagmanager.com/gtm.js?id='+i+dl;
f、 parentNode.insertBefore(j,f);
})(窗口、文档、“脚本”、“数据层”、“GTM-KJSQSJ”);
@动作(“索引”、“搜索表面”) @RenderBody()