@ MartinShishkov О, вы правы, они являются частью вариантов Razor. Понятия не имею, почему я думал, что они были частью MvcOptions. Исправил это в моем ответе, спасибо! :)
аюсь создать страницу AMP с ASPNET Core MVC. Я не смог найти много документов, если таковые имеются. Для ASPNET было предложено использоватьDisplayModes
создать дисплей Google AMP. Тем не менее, ASPNet Core не поддерживаетDisplayModes
и я пытаюсь найти способ обойти это.Любые предложения будут ценны!
@model Models.Article
@{
Layout = null;
}
<!doctype html>
<html amp>
<head>
<meta charset="utf-8">
<link rel="canonical" href="/article.cshtml">
<link rel="amphtml" href="/article.amp.cshtml">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<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>
<script async src="https://cdn.ampproject.org/v0.js"></script>
</head>
<body>
<article>
<h2>@Html.DisplayFor(model => model.Title)</h2>
<div>@Convert.ToDateTime(Model.PublishedDate).ToString("dddd, MMMM d, yyyy")</div>
</article>
</body>
</html>