eudicots / Cactus

Static site generator for designers. Uses Python and Django templates.
BSD 3-Clause "New" or "Revised" License
3.47k stars 314 forks source link

Google Webmaster Tools rejects sitemap.xml formatting #126

Open aanomm opened 9 years ago

aanomm commented 9 years ago

My sitemap is building fine and viewable online, but Google Webmaster Tools won't accept the formatting of it saying...

"Errors. Invalid URL. This is not a valid URL. Please correct it and resubmit."

It looks to be the the relative URLs are the issue. Can anyone confirm this? And if this is the issue, is the a workaround?

ibarria0 commented 9 years ago

I have this same issue when using prettify:true

ibarria0 commented 9 years ago
    def absolute_final_url(self):
        """
        Return the absolute URL for this page in the final build
        """
        return urlparse.urljoin(self.site.url, self.final_url)

self.site.url is never set. A possible workaround would be a to add a config line which specifies the site.url or to uncomment lines 115:116 in site.py.

ibarria0 commented 9 years ago

Hello again! Lines 98-100 in site.py define the site.url.

You need a site-url key in the config JSON. Im gonna update the documentation.

ibarria0 commented 9 years ago

https://github.com/koenbok/Cactus/pull/127