Forum OpenACS Q&A: Re: Google Sitemaps API

Collapse
25: Re: Google Sitemaps API (response to 24)
Posted by Carsten Clasohm on
I have done an implementation for OpenACS 5.1.5, which allows modules like lars-blogger to generate Google Sitemaps.

The infrastructure package can be found at

http://www.clasohm.com/prj/clasohm.com/browser/trunk/packages/google-sitemaps/

The code that generates the sitemap for lars-blogger is in

http://www.clasohm.com/prj/clasohm.com/file/trunk/packages/lars-blogger/tcl/sitemap-procs.tcl
http://www.clasohm.com/prj/clasohm.com/file/trunk/packages/lars-blogger/tcl/sitemap-init.tcl
http://www.clasohm.com/prj/clasohm.com/file/trunk/packages/lars-blogger/www/index.vuh

For this to work, you will also need the directory "google-sitemaps" in the server root, which must be writable by the Web server.

The generated sitemaps can be downloaded at [ad_url]/google-sitemaps/index.xml. See

http://www.clasohm.com/google-sitemaps/index.xml

for an example.

If you want to retrieve a copy of the code, you can do so with Subversion and the URL http://www.clasohm.com/svn/clasohm.com/trunk/

Collapse
Posted by russ m on
For this to work, you will also need the directory "google-sitemaps" in the server root, which must be writable by the Web server.

The generated sitemaps can be downloaded at [ad_url]/google-sitemaps/index.xml. See

http://www.clasohm.com/google-sitemaps/index.xml

according to the Sitemaps docs, a sitemap can only refer to pages below it in the site hierarchy - so a map at http://example.com/google-sitemaps/index.xml will only be used for other pages below http://example.com/google-sitemaps/. So for this to actually help it looks like the sitemap file needs to be placed directly in the site root directory.