Create a google sitemap.xml file ?
Hi,
we just launched our website and am anxious to see google re-index the site. One thing we don't have is a sitemap.xml file.
I'm pretty sure I can use an index block to create a sitemap.xml file for google to index. has anyone already written some velocity to do this?
Thanks,
Jeff
Discussions are closed to public comments.
If you need help with Cascade CMS please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by Camilo Payan on Jun 22, 2011 @ 08:10 PM
I'm working on the same thing, with a XSLT solution, which is attached.
Dependencies:
as you can see, you need a variables format. I use it for more than this, but the important thing is to declare a variable there named "siteUrl". Reason being that the sitemap spec on sitemaps.org needs a fully qualified url: http://yoursite.com/foo/bar but there's isn't a simple or easy way to do this. To make this script more portable, we keep hardcoded stuff in a variables format, and include it as needed.
'Twas actually a suggestion from Ross in http://help.hannonhill.com/discussions/how-do-i/331-translate-site-..., and can stand to get some improvement.
2 Posted by bwmyers on Jun 28, 2011 @ 06:39 PM
Can you share the two include files that you are using (variables and format date)?
3 Posted by cpayan on Jun 28, 2011 @ 08:55 PM
The variables.xslt file is simple. It's just an xslt file containing a bunch of variables like so:
http://www.mysite.com//xsl:variable /xsl:stylesheet
I've attached the format-date.
4 Posted by bwmyers on Jul 01, 2011 @ 05:45 PM
Thanks a lot Camilo. -Bradley
5 Posted by bwmyers on Jul 01, 2011 @ 08:05 PM
Quick question on below:
<xsl:value-of select="concat('[system-view:external]',$siteUrl,'[/system-view:external][system-asset]',link,'[/system-asset]')"/>
What exactly is link? When I publish the xml file out I get:
http://www.pizzafresh.com/
For everything. Need the rest of the path on the end. I am assuming link takes care of that but I didn't see it defined anywhere.
Thanks For your help. -Bradley
6 Posted by bwmyers on Jul 01, 2011 @ 08:25 PM
Never mind the last comment. My block was set up wrong. Thanks, Again
Charlie Holder closed this discussion on Mar 27, 2012 @ 04:36 AM.