planetlabs / planet-client-python

Python client for Planet APIs
https://planet-sdk-for-python-v2.readthedocs.io/en/latest/
Apache License 2.0
271 stars 91 forks source link

Add a redirect to the v2 docs to the v1 gh-pages site #1052

Closed tbarsballe closed 1 month ago

tbarsballe commented 1 month ago

Recently, we had some users landing on the old v1 docs rather than the v2 docs. As we do still have some users on v1, I think it is important to keep those docs around, but they should have a link to v2 so that new users don't get lost. This PR adds a deprecation notice and link to the top of the v1 docs:

Screenshot 2024-07-23 at 10 56 41 AM

The old v1 docs appear to be entirely static rather than the more typical Jekyll, so this change is done in JS, so it applies to all pages with minimal effort and duplication. Not optimal, but for a deprecated doc site that isn't going to change anytime soon I think its fine.

Proposed Changes:

For inclusion in changelog (if applicable):

  1. Update the v1 gh-pages documentation with a deprecation notice and a link to the v2 documentation

PR Checklist:

(Optional) @mentions for Notifications:

ischneider commented 1 month ago

Nice, thanks!

I suppose we can check SEO after but my initial thought was a custom sphinx header or such (so JS is not required), though I certainly appreciate the simplicity of this approach...

tbarsballe commented 1 month ago

@ischneider Yeah, that'd definitely be the cleaner solution. I poked around the repo and frankly didn't want to try untangling the 4+ year-old doc build situation, this was the simplest and fastest solution I could throw together to solve this while still looking half-decent.