GenericMappingTools / gmt

The Generic Mapping Tools
https://www.generic-mapping-tools.org
Other
858 stars 359 forks source link

Broken link to 6.2.0rc1 in the docs #5161

Closed maxrjones closed 3 years ago

maxrjones commented 3 years ago

Description of the problem

The 'latest' option in the GMT documentation (https://docs.generic-mapping-tools.org/latest/index.html#) correctly links to 6.2.0rc1, but the 6.2rc1 dropdown does not work (https://docs.generic-mapping-tools.org/6.2rc1). I think it is an option to manually fix the links following these methods but with GMT tags (https://github.com/GenericMappingTools/pygmt/issues/1149#issuecomment-818249811). But, in my opinion it would also be fine to fix as part of the next release candidate.

seisman commented 3 years ago

The 6.2.0rc1 documentation doesn't show the switch: image

I think it's because the regex doesn't match the URL of RC releases.

https://github.com/GenericMappingTools/gmt/blob/b5bad9b5fefbe01563c5159c875c87a012663079/doc/rst/_static/version_switch.js#L9

maxrjones commented 3 years ago

The 6.2.0rc1 documentation doesn't show the switch: image

I think it's because the regex doesn't match the URL of RC releases.

https://github.com/GenericMappingTools/gmt/blob/b5bad9b5fefbe01563c5159c875c87a012663079/doc/rst/_static/version_switch.js#L9

Yes, I agree that this is likely the problem. A secondary problem is that I mistakenly switched the version and title in #5159. Do you think it is better to update the regex to allow for release candidate URLS or to not include a switch for pre-releases?

seisman commented 3 years ago

I think it's better to update the regex so that people can easily compare any two versions of a single page.

maxrjones commented 3 years ago

I think it's better to update the regex so that people can easily compare any two versions of a single page.

I agree. I can work on this, but I have not been able to get the local testing of the switch to work. Do you have any recommendations for testing locally?

seisman commented 3 years ago

Do you have any recommendations for testing locally?

There is a detailed instruction in the PyGMT PR: https://github.com/GenericMappingTools/pygmt/pull/621