From f6f75d364fba97a5160dd1232086a903ca9bbaf2 Mon Sep 17 00:00:00 2001 From: Sergey Chebotar Date: Fri, 16 Jun 2023 07:03:56 +0300 Subject: Add sitemap --- Pages/Sitemap.xml.cshtml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Pages/Sitemap.xml.cshtml (limited to 'Pages/Sitemap.xml.cshtml') 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 -- cgit v1.2.3