diff --git a/Pages/Robots.txt.cshtml b/Pages/Robots.txt.cshtml index 54c25f2..4c46b79 100644 --- a/Pages/Robots.txt.cshtml +++ b/Pages/Robots.txt.cshtml @@ -6,4 +6,5 @@ User-agent: * Disallow: /freedom Disallow: /account -Disallow: /Account \ No newline at end of file +Disallow: /Account +sitemap: https://mydarlingunderwear.ru/sitemap.xml \ No newline at end of file diff --git a/Pages/Sitemap.xml.cshtml b/Pages/Sitemap.xml.cshtml new file mode 100644 index 0000000..f686066 --- /dev/null +++ b/Pages/Sitemap.xml.cshtml @@ -0,0 +1,21 @@ +@page "/sitemap.xml" +@using Microsoft.AspNetCore.Http +@{ + var pages = new List + { + new {Url = "https://mydarlingunderwear.ru/", LastUpdated = DateTime.Today} + }; + Layout = null; + Response.ContentType = "text/xml"; + await Response.WriteAsync(""); +} + + + @foreach (var p in pages) + { + + @p.Url + @p.LastUpdated.ToString("yyyy-MM-dd") + + } + \ No newline at end of file