KhronosGroup / KhronosGroup/OpenCL-Docs
Enhancement: Improve guessing the URL to the latest refpages version
- Dominant language
- Python
- Stars
- 420
- Forks
- 131
- Avg merge
- 5d 13h
- Merged PRs (30d)
- 11
Description
Followup on https://github.com/KhronosGroup/OpenCL-Docs/issues/251
@Khronoswebmaster
Minor issue:
I guess you added some kind of link (named `latest`) to the www.khronos.org/registry/OpenCL/sdk/ folder, that redirects to the `2.2` folder.
In the same way, could you add a link named `xhtml` to the www.khronos.org/registry/OpenCL/sdk/2.2/docs/man/ folder, that redirects to the `html` folder?
This way, if one does not have a "latest" link, one can simply change the version number to `latest`, and it works. If one currently changes the version number in an old link to `latest`, one gets redirected, to an inexistent location.
Example:
Some link led me to this webpage:
www.khronos.org/registry/OpenCL/sdk/1.0/docs/man/xhtml/clGetDeviceIDs.html
Assuming I am a somewhat "technologically affine" person, I think "oh, maybe there is a newer version available, let's try changing the version number in the URL to `latest`" (yes, this strategy works quite often) - I then get the URL:
www.khronos.org/registry/OpenCL/sdk/latest/docs/man/xhtml/clGetDeviceIDs.html
That link automatically redirects to the invalid location:
www.khronos.org/registry/OpenCL/sdk/2.2/docs/man/xhtml/clGetDeviceIDs.html
If the `xhtml` folder would now automatically redirect to `html`, it would have worked.
-----
For the same reason (guessing the URL), could you redirect www.khronos.org/registry/OpenCL/sdk/docs/ to www.khronos.org/registry/OpenCL/sdk/latest/docs/ ?
If one removes the version number from
www.khronos.org/registry/OpenCL/sdk/1.0/docs/man/xhtml/clGetDeviceIDs.html
one gets
www.khronos.org/registry/OpenCL/sdk/docs/man/xhtml/clGetDeviceIDs.html
which currently also doesn't work...
(The strategy "remove the version number from the URL to get the latest version" also works for many pages...)
-----
tl;dr;
Could you please redirect
www.khronos.org/registry/OpenCL/sdk/2.2/docs/man/xhtml/ to www.khronos.org/registry/OpenCL/sdk/2.2/docs/man/html/ and
www.khronos.org/registry/OpenCL/sdk/docs/ to www.khronos.org/registry/OpenCL/sdk/latest/docs/ ?
Note: I previously had some URLs in this post wrong, but I've already corrected them.
Contributor guide
Research direction
Start by checking the current behavior of the listed OpenCL SDK URLs and the existing `latest` redirect. Trace where these web redirects are configured or deployed, then ensure `2.2/docs/man/xhtml/` redirects to `2.2/docs/man/html/` and `docs/` redirects to `latest/docs/`; verify both example URL patterns work.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100