sitemap

How to link to a child site-map file from a parent site map in ASP.NET MVC4 using MVCSitemapProvider?

匿名 (未验证) 提交于 2019-12-03 09:19:38
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using MVCSitemapProvider by Maarten Balliauw with Ninject DI in MVC4. Being a large-scale web app, enumerating over the records to generate the sitemap xml accounts for 70% of the page load time. For that purpose, I went for using new sitemap files for each level-n dynamic node provider. <mvcSiteMap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-4.0" xsi:schemaLocation="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-4.0 MvcSiteMapSchema.xsd"> <mvcSiteMapNode

recommended way or plugin to create google sitemaps for ruby on rails app?

匿名 (未验证) 提交于 2019-12-03 08:54:24
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I did a quick Google search and didn't see anything super-great to automate creation and updating of my google sitemap for the ruby on rails app. Any suggestions? 回答1: I added a dynamic sitemap to a blog application just recently. These steps should get you started. Add this route towards the bottom of your config/routes.rb file (more specific routes should be listed above it): map . sitemap '/sitemap.xml' , : controller => 'sitemap' Create the SitemapController (app/controllers/sitemap_controller): class SitemapController <

Multiple Sitemap: entries in robots.txt?

无人久伴 提交于 2019-12-03 06:30:32
问题 I have been searching around using Google but I can't find an answer to this question. A robots.txt file can contain the following line: Sitemap: http://www.mysite.com/sitemapindex.xml but is it possible to specify multiple sitemap index files in the robots.txt and have the search engines recognize that and crawl ALL of the sitemaps referenced in each sitemap index file? For example, will this work: Sitemap: http://www.mysite.com/sitemapindex1.xml Sitemap: http://www.mysite.com/sitemapindex2

How to efficiently serve massive sitemaps in django

十年热恋 提交于 2019-12-03 05:06:22
问题 I have a site with about 150K pages in its sitemap. I'm using the sitemap index generator to make the sitemaps, but really, I need a way of caching it, because building the 150 sitemaps of 1,000 links each is brutal on my server.[1] I COULD cache each of these sitemap pages with memcached, which is what I'm using elsewhere on the site...however, this is so many sitemaps that it would completely fill memcached....so that doesn't work. What I think I need is a way to use the database as the

Django Sitemaps and “normal” views

余生颓废 提交于 2019-12-03 03:13:35
问题 Maybe I didn't understand the purpose of Sitemaps or maybe I didn't understand how to use sitemaps. Right now my sitemap is including all "dynamically" created pages, like the blog posts. But how do I add "static" pages like my index and contact page? Or shouldn't these views be in the sitemap? I thought -all- pages should be on the sitemap. For example, how would I include such view (r'^contact/', include('contact-recaptcha.urls')), if there is no queryset? For reference: http://docs

get_absolute_url - Django`s sitemap

匿名 (未验证) 提交于 2019-12-03 02:56:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to enable sitemap-generation in Django, so I do the following, how it explained here model: class Car(models.Model): def __unicode__(self): return self.name name = models.CharField('Name', max_length=10) active = models.BooleanField() urls: car_dict = { 'queryset': Car.objects.filter(active=1), } sitemaps = { #'flatpages': FlatPageSitemap, 'car': GenericSitemap(car_dict, priority=0.5), } But I have an error on /sitemap.xml: 'Car' object has no attribute 'get_absolute_url . How to fix it? I need to create some classes, how it explained

Sitemap for a site with a large number of dynamic subdomains

与世无争的帅哥 提交于 2019-12-03 02:52:20
I'm running a site which allows users to create subdomains. I'd like to submit these user subdomains to search engines via sitemaps. However, according to the sitemaps protocol (and Google Webmaster Tools), a single sitemap can include URLs from a single host only. What is the best approach? At the moment I've the following structure: Sitemap index located at example.com/sitemap-index.xml that lists sitemaps for each subdomain (but located at the same host). Each subdomain has its own sitemap located at example.com/sitemap-subdomain.xml (this way the sitemap index includes URLs from a single

How to generate xsi:schemalocation attribute correctly when generating a dynamic sitemap.xml with LINQ to XML?

匿名 (未验证) 提交于 2019-12-03 02:52:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am generating a dynamic sitemap.xml According to sitemaps.org this is the header for a sitemap.xml <?xml version='1.0' encoding='UTF-8'?> <urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> ... </url> </urlset> So I'm using LINQ To XML to generate the sitemap.xml XNamespace ns = "http://www.sitemaps.org/schemas/sitemap/0.9"; return new XElement(ns +

Serving sitemap.xml and robots.txt with Spring MVC

孤者浪人 提交于 2019-12-03 02:25:54
问题 What is the best way to server sitemap.xml and robots.txt with Spring MVC ? I want server these files through Controller in cleanest way. 回答1: I'm relying on JAXB to generate the sitemap.xml for me. My controller looks something like the below, and I have some database tables to keep track of the links that I want to appear in the sitemap:- SitemapController.java @Controller public class SitemapController { @RequestMapping(value = "/sitemap.xml", method = RequestMethod.GET) @ResponseBody

Jekyll建站之搜索引擎收录小技巧

匿名 (未验证) 提交于 2019-12-03 00:38:01
访问我的个人博客 https://www.taowong.com ,阅读更多文章。 当你用Jekyll辛辛苦苦搭建好了个人博客网站,兴奋的想要在谷歌上搜索自己的博客信息时,却突然发现完全没有任何记录?不止谷歌,其它搜索引擎,例如百度、雅虎等等也是一片空白,此时你是否会心生疑虑,为什么我的网站在搜索引擎中搜不到呢? 想要理解原因,我们首先得明白,为什么其它的网站能被搜索引擎收录?原因是搜索引擎的爬虫程序提前抓取了这些网站的相关信息,然后收录下来供搜索使用。 想让自己的网站被收录,一个办法是被动等待爬虫访问你的网站,但是在internet浩瀚的海洋中,这犹如大海捞针,非常困难。另一个办法就是主动通知爬虫,告诉他们这里有信息希望被收录。 所以对于自建博客的我们来说,把文章发到博客上还不能算结束,我们得想办法主动提高博客被收录的几率,下面让我来介绍几个相关的小技巧。 sitemap又称站点地图,顾名思义它就像一张地图一样,记录了网站所有网页的路径信息,例如下面的例子: <? xml version = "1.0" encoding = "UTF-8" ?> < urlset xmlns = "http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"