Problems about cargo doc

docs with the problem

I'm using the cargo doc and published it to the github

It works fine in the local but some of the pages cannot view e.g this page
I think that browser thinks that struct.BlockEvent is a file but not html.

How to fix it?

GitHub Pages runs Jekyll by default. That might be what's breaking your site.

Maybe try add a .nojekyll file to the root of your repo?

I tried to visit that site with curl --verbose, and got this interesting log:

* Server certificate:
*  subject: C=US; ST=California; L=San Francisco; O=Cloudflare, Inc.; CN=docs.pigeons.icu
...
< HTTP/2 308 
< date: Sat, 20 Nov 2021 07:23:16 GMT
< content-length: 0
< location: https://docs.pigeons.icu/rust/mcpi-rs/mcpi_rs/events/struct.BlockEvent

So my guess is you have a Cloudflare rule that's causing a redirect. Turning off Cloudflare should solve the problem — GitHub Pages uses a CDN already, so there's no reason to use it here.

None of them works

If it helps, this is the template I use to publish my crate's docs to GitHub Pages from CI.

GitHub have a section in their docs for serving GitHub Pages via a custom domain name.

https://docs.github.com/articles/using-a-custom-domain-with-github-pages/

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.