Azure / azure-sdk-for-c

This repository is for active development of the Azure SDK for Embedded C. For consumers of the SDK we recommend visiting our versioned developer docs at https://azure.github.io/azure-sdk-for-c.
MIT License
218 stars 115 forks source link

Docs redirect fails if page doesn't exist between versions #966

Closed danieljurek closed 9 months ago

danieljurek commented 3 years ago

Repro:

  1. Go to https://azuresdkdocs.blob.core.windows.net/$web/c/docs/1.0.0-preview.1/md_sdk_platform_noplatform__r_e_a_d_m_e.html
  2. Click version dropdown and select "1.0.0-preview.3"

Expected: Changing the version sends you somewhere valid.

Actual: 404 page

Suggestion: Use XHR to check the redirecting location before visiting, if 200 change page location, if not, send to docs root

RickWinter commented 3 years ago

This same problem exists in other languages docs such as .net's

danieljurek commented 3 years ago

https://github.com/Azure/azure-sdk/issues/1668 tracks the general fix for this. We should pull in the solution that gets used here.

danieljurek commented 3 years ago

Looks like there's a fix for this in .NET. Will check in on how this can be ported to other languages.

sima-zhu commented 3 years ago

Working on c docs. Currently, the dropdown only listed one version. Will take a look on it.

danieljurek commented 9 months ago

This is an edge case though it affects all of our GithubIO docs. Since we haven't seen a lot of support issues related to this I'm closing. If this becomes a priority we can revisit.