如何在.NET core 2中动态创建sitemap.xml? [英] How to create dynamically sitemap.xml in .NET core 2 ?

查看:377
本文介绍了如何在.NET core 2中动态创建sitemap.xml?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁能告诉我如何在.net core 2中创建站点地图?



我尝试过:



文章不在核心2中工作。

Can anyone tell me How to create a Site map in .net core 2 ?

What I have tried:

this article not working in core 2.

推荐答案

我目前有一个使用ASP.NET Core 2.0构建的托管应用程序,并使用了以下NuGet包, GitHub - uhaciogullari / SimpleMvcSitemap:一个用于在ASP.NET MVC和ASP.NET Core MVC中创建站点地图文件的简单库应用程序 [ ^ ],对我来说绰绰有余。



我能够生成动态内容,博客等的站点地图,并且它也被Bing和Google网站管理员等接受。我相信你也可以使用它。有一件事,它不是一个即插即用的,它是一个可以用来生成站点地图的工具,你必须手动添加节点。
I currently have an application hosted that was built using ASP.NET Core 2.0, and that used the following NuGet package, GitHub - uhaciogullari/SimpleMvcSitemap: A simple library for creating sitemap files inside ASP.NET MVC and ASP.NET Core MVC applications[^], it was more than enough for me.

I was able to generate the sitemap for dynamic content, blogs and more, and it was accepted by Bing and Google Webmaster etc. too. I am sure you will be able to use it as well. One thing, it is not a plug-and-play, it is a tool that you can use to generate the sitemap, you will have to manually add the nodes.


这篇关于如何在.NET core 2中动态创建sitemap.xml?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆