Open joepio opened 12 months ago
I had to postprocess with
sed -i -e 's/
I had the same issue.
I used several commands to resolve errors:
sed -i -e 's/urls>/url>/g' book/sitemap.xml # not recognised tags
sed -i -e 's/xlmns/xmlns/g' book/sitemap.xml # error namespaces
Portable version (works on both Linux and macOS).
mdbook-sitemap-generator -d <DOMAIN> \
| awk '{gsub(/urls>/, "url>"); gsub(/xlmns/, "xmlns"); print}' \
> <OUTPUT_DIR>/sitemap.xml
Uh. This is pointless. Just use a generic sitemap generator on the generated site.
Yes indeed. Piping through awk
also fixed the errors that Google Search Console was giving me. I was using the latest version 0.2.0 available in cargo.
But this is just a work-around. The generated <urls>
tags in the sitemap.xml
should all be <url>
. Isn't that a relatively simple fix? 😅
Ah yes, a pull request with a fix was already submitted by someone else: https://github.com/rxdn/mdbook-sitemap-generator/pull/3
Could you please accept? 😄
Hi there! I just created a sitemap, hosted it and submitted it to google, but got a couple of errors: