-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preserve version picker function when the underlying filename changes #3298
Comments
Hi David, is this filename change absolutely necessary? The way we know documents are the same across versions is by seeing that they have the same filename. The UI is acting as expected for any undefined filename in a version. When the user switches from an older version to latest, it attempts to redirect the user to the file development-mode (retrieved from the previous URL), which is not found in the new version files, so the We could attempt to create a better way to check if the files exist, but this would not result in a successful linking between versions. This would require some source of external data, such as a JSON, to indicate aliases for files, which may be harder to maintain. I understand the motivation for wanting to change the filename, but from the perspective of handling the docs building and logic, the best thing would be to keep the filenames the same for now. If changing the filename is a necessity, let me know and I will look into further options. To be clear though, if we do go ahead with changing the filenames, a good portion of logic would need to be modified to handle it, and you likely would not be able to have differing filenames for at least a month, likely longer with the current resources available for the website. We could exclude the current version of the docs when checking if the file exists in other versions, but this would then result in a blank |
Hi Natalie- thanks for this detailed explanation. As far as I know, this is not a crucial update. I think I can just close the doc issue, as the benefit of making the change is unlikely to justify the scope of work for the website team. If anyone from devex disagrees, we can revisit. I'm not sure whether you want to keep this issue open and iceboxed but feel free to close it if not. |
Closing this issue for now as we have concluded that the benefits do not outweigh the cost at this time. |
If we need to change a filename in the docs, the version selection for that topic is broken. This is not a high-priority issue, just opening to investigate possible solutions.
Eg- if we change
development-mode.adoc
todev-mode.adoc
, the URL changes/docs/latest/development-mode.html
--->/docs/latest/dev-mode.html
. We can set the following redirect inredirect.properties
to cover most use cases:/docs/latest/development-mode.html=/docs/latest/dev-mode.html
.However, the version picker no longer works for the topic.
/docs/latest/dev-mode.html
and select any previous version, you get aDocument does not exist
message./docs/*/development-mode.html
and switch to current version (or going fwd any version 23.0.0.7+), you get :which is interesting, but also contradictory. To recreate, see
Dev mode on the current draft site.
One solution might be to create individual redirects for each extant version, eg
/docs/23.0.0.4/dev-mode.html=/docs/23.0.0.4/development-mode.html
But those statements will become redundant with each release as older versions drop off and also will junk up redirects file over time if more file name changes are needed. However, at this point file name changes are relatively rare so that could be a stopgap solution if the alternatives are overly complex (or nonexistent).
This came up from a recent request to change a file name in the docs- OpenLiberty/docs#6726
As stated in that issue, to manually deliver a new file, new TOC entry, and redirects to all 26 versions where the file exists would be nontrivial, possibly requiring ~ 80 individual PRs. So changing the file name in all versions isn't a viable option.
The text was updated successfully, but these errors were encountered: