[DOC-10557] Fix LTS date logic bug and 23.1 TOC #18667
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[DOC-10557] Fix LTS date logic bug and 23.1 TOC
These bugs are causing the unsupported-version admonition to show up only on Release pages and not in versioned pages for any version (including EOL).
This PR takes over #18615 (which already had review) and implements its fixes, as well as fixing a regression I somehow introduced there and making the logic just a bit more safe. I keep missing the "In LTS maintenance or LTS assistance, just show the LTS assistance" message in the logic.
Previews
Versioned release pages:
GA: https://deploy-preview-18667--cockroachdb-docs.netlify.app/docs/releases/v24.1 (No admonition)
GA: https://deploy-preview-18667--cockroachdb-docs.netlify.app/docs/releases/v23.2 (No admonition)
LTS: https://deploy-preview-18667--cockroachdb-docs.netlify.app/docs/releases/v23.1 (LTS admonition)
EOL: https://deploy-preview-18667--cockroachdb-docs.netlify.app/docs/releases/v21.1 (EOL admonition)
Versioned non-release pages:
GA: https://deploy-preview-18667--cockroachdb-docs.netlify.app/docs/v24.1/authentication (No admonition)
GA: https://deploy-preview-18667--cockroachdb-docs.netlify.app/docs/v23.2/authentication (No admonition)
LTS: https://deploy-preview-18667--cockroachdb-docs.netlify.app/docs/v23.1/authentication (LTS admonition)
EOL: https://deploy-preview-18667--cockroachdb-docs.netlify.app/docs/v21.1/authentication (EOL admonition)
Unversioned pages:
Homepage: https://deploy-preview-18667--cockroachdb-docs.netlify.app/docs/ (No admonition)
Releases index: https://deploy-preview-18667--cockroachdb-docs.netlify.app/docs/releases/ (No admonition, LTS link in 23.1 table rows)