JuliaPy / PythonCall.jl

Python and Julia in harmony.
https://juliapy.github.io/PythonCall.jl/stable/
MIT License
776 stars 63 forks source link

Google search for documentation gives 404 error. #362

Closed LilithHafner closed 1 year ago

LilithHafner commented 1 year ago
Screenshot 2023-09-20 at 7 48 23 AM Screenshot 2023-09-20 at 7 48 34 AM

This is probably due to the repo transfer. That URL should really be redirected.

cjdoris commented 1 year ago

Yeah. I thought maybe it would redirect automatically (like it does for the repo itself) but no dice. Any idea how?

LilithHafner commented 1 year ago

This is a way to do it, but it seems really icky to me. It also seems like the best way (a 301 redirect) is not possible. I suppose this is a disadvantage of pointing to a domain name you do not control.

LilithHafner commented 1 year ago

Whelp, here's a fix. It's real icky, but it should work.

As a test,

https://lilithhafner.github.io/PythonCall.jl https://lilithhafner.github.io/PythonCall.jl/stable/ https://lilithhafner.github.io/PythonCall.jl/dev/ https://lilithhafner.github.io/PythonCall.jl/stable/pythoncall-reference/#PythonCall.pybuiltins

https://lilithhafner.github.io https://lilithhafner.github.io/Nonexistant.jl

One downside is that this breaks the documentation of all other packages using your github.io domain https://lilithhafner.github.io/Minesweeper.jl/stable/

It won't be great for SEO, but tbh it's our responsibility to make good documentation and it's search engines' responsibility to make it discoverable.

To make this actually work, simply copy the contents of https://github.com/LilithHafner/lilithhafner.github.io to a new repository https://github.com/cjdoris/cjdoris.github.io and change "lilithhafner" to "cjdoris" on this line

cjdoris commented 1 year ago

Thanks for the suggestions, but I've just implemented a slightly less icky version by creating a bunch of pages which redirect to the corresponding page in the new location. They contain a canonical link, which search engines should notice and start to direct traffic there instead.

For example: https://github.com/cjdoris/cjdoris.github.io/blob/master/PythonCall.jl/stable/pythoncall/index.html

LilithHafner commented 1 year ago

You loose heading specifiers on the redirect, but not a big loss; I think you made the right choice.