rust-lang / mdBook

Create book from markdown files. Like Gitbook but implemented in Rust
https://rust-lang.github.io/mdBook/
Mozilla Public License 2.0
17.71k stars 1.61k forks source link

Sitemap.xml Generate #1491

Open cuongtqtran opened 3 years ago

cuongtqtran commented 3 years ago

mdBook have no sitemap.xml generator. I think of it will hurt SEO.

gagarine commented 3 years ago

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?

avivace commented 3 years ago

Any update on this?

joshrotenberg commented 3 years ago

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

ISSOtm commented 3 years ago

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.

ISSOtm commented 3 years ago

Finished the PR in question!

joshxyzhimself commented 2 years ago

Also looking for this, thank you.

sunshowers commented 2 years ago

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.

pcgeek86 commented 10 months ago

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.