mdBook
mdBook copied to clipboard
Sitemap.xml Generate
mdBook have no sitemap.xml generator. I think of it will hurt SEO.
Agree.
They may be other issue as well, Google seem to not index pages of a book, even if the first page was submitted and indexed. Even after months. Other experience this?
Any update on this?
I wonder if this is something that could be generated with a preprocessor or backend plugin: https://rust-lang.github.io/mdBook/for_developers/index.html
With a back-end, this would require calling the HTML renderer from that back-end which doesn't sound all that great imo. I am preparing a PR to add support for this in the built-in HTML renderer, I think we can judge then if it's worth integrating.
Finished the PR in question!
Also looking for this, thank you.
If folks are looking for a workaround in the meantime, I ended up using an existing static site sitemap generator called static-sitemap-cli. See the CI job at https://github.com/sunshowers-code/rust-cli-recommendations/blob/main/.github/workflows/docs.yml for how to use it, and the generated sitemap itself here.
I had this same problem. Only the landing page in my mdBook site was indexed. I had to manually submit all other pages (about 8) for indexing.
There's this project: https://github.com/rxdn/mdbook-sitemap-generator
EDIT: but it doesn't seem maintained, a broken install has plagued this for half a year already.
Facing the same problem I've decided to fork/reimplement https://github.com/rxdn/mdbook-sitemap-generator here: https://github.com/loicsikidi/mdbook-sitemap-generator.
The project is working (e.g., https://tpmpills.com/sitemap.xml) and I'm planning to make the tool compliant w/ mdbook backend to ease the setup.
Today, I had time implement the backend feature, it's available starting >= v1.2.0.
📝 check the readme for more info.