godotengine / godot-docs

Godot Engine official documentation
https://docs.godotengine.org
Other
3.59k stars 2.96k forks source link

Offline stable docs #9419

Open CitrusWire opened 1 month ago

CitrusWire commented 1 month ago

This page: https://github.com/godotengine/godot-docs says: "To browse the documentation offline, you can download an HTML copy for offline reading (updated every Monday)."

It doesn't explicitly say it's unstable, though I guess this is implied by the "updated every Monday". Surely a better option for this page is a link to download the stable docs as that's what most people will want?

2nd:

When I load these docs, I get: image

except the link to the "stable" docs points to the page I'm already looking at: localhost/godot_docs/tutorials/2d/index.html. So every page in the docs starts by wasting the premium vertical real-estate with a meaningless warning.

AThousandShips commented 1 month ago

You can find all the different branches of offline documentation on the main page in the latest branch, see here, this needs to be updated on the main read-me as well

CitrusWire commented 1 month ago

Thanks. Yeah, those are the links I was looking for. I'd suggest they should be there rather than the current docs one, or at least there should be clear links to both sets.

AThousandShips commented 1 month ago

The stable docs page hasn't been updated yet so that's just something that'll be updated when the cherry-picks are rolled over, the rest is just a simple change to the main readme

Calinou commented 1 month ago

Regarding the unstable version notice, the reason why this notice is here is because of this:

https://github.com/godotengine/godot-docs/blob/6e6b25780110dcf66d107cfb9c36991cffca6c01/_templates/layout.html#L33-L45

However, godot_is_latest is correctly set to False in conf.py in the stable branch, so it doesn't appear there.

When building the master branch on CI, godot_is_latest is explicitly set to False before building to hide the warning box: https://github.com/godotengine/godot-docs/blob/222a545b57554c9c37641e10dd8bc6c53c0d45fc/.github/workflows/build_offline_docs.yml#L47-L49

This used to work, but it doesn't work anymore (even though this sed command works correctly locally). I have no idea why this is happening.