Closed nfriedly closed 10 years ago
It looks like this is due to a bug in sitemap.js - fixed in the above pull request. Please update whenever that gets merged in, or, if it doesn't then feel free to depend on my fork instead :)
Ok, sitemap
is now fixed. Please update to version 0.7.1 (or newer) at your earliest convenience :)
Still getting a similar error:
error: Something went wrong with the action error: An error occured: Protocol is required
Hum, I just updated my site to use the current version of docpad-plugin-sitemap instead of the one I had hacked together before the change got merged in, and it seems to work: http://nfriedly.com/sitemap.xml - code at https://github.com/nfriedly/nfriedly.com
Are you sure you're on the 2.2.0 release? Is your code online anywhere?
Found the issue, my templateData.site.url was set to "/", as I don't like to force a domain. Replacing it with a full url fixes the issue, though it's not ideal.
Maybe the plugin should allow you to set the url in the plugin settings, rather than forcing the templateData entry.
Upon further investigation it seems there is an undocumented sitemap.hostname config variable that does just this. All good now :)
Cool, I'm going to close this one then.
Not sure what's going on here. I tried adding my site URL to both
plugins.sitemap.hostname
andtemplateData.site.url
, with and without "http://", and it doesn't seem to make a difference.I tried running
docpad run --debug
, and that gets me debug output from docpad but not any plugins, but I think that's a bug in docpad.Update: this was due to having the string 'http' in the path of one of my urls - the current sitemap.js release sees that and then fails to add the site protocol and hostname, and then chokes later when the URL doesn't have one.