Skip to content

docs: Replace gh pages with redirects to otel.io registry - #2287

Open
thompson-tomo wants to merge 6 commits into
open-telemetry:mainfrom
thompson-tomo:chore/1435_ghpages
Open

docs: Replace gh pages with redirects to otel.io registry#2287
thompson-tomo wants to merge 6 commits into
open-telemetry:mainfrom
thompson-tomo:chore/1435_ghpages

Conversation

@thompson-tomo

@thompson-tomo thompson-tomo commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Closes #1435

Instructions on merge steps based on testing done in my fork:

  • Update github pages deployment setting to github actions (see screenshow below)
  • Merge this pr
  • Verify gh pages deployment occured
  • Delete gh-pages branch
IMG_0345

Comment thread .github/workflows/pages.yml Fixed
Comment thread .github/workflows/pages.yml Fixed
Comment thread .github/workflows/pages.yml Fixed
Comment thread .github/workflows/pages.yml Fixed
Comment thread .github/workflows/pages.yml Fixed
Updated GitHub Actions workflow for deploying to Pages with specific version tags for actions.
@thompson-tomo thompson-tomo changed the title Define redirects & deployment docs: Define redirects & deployment for gh pages Aug 7, 2026
@thompson-tomo
thompson-tomo marked this pull request as ready for review August 7, 2026 11:21
@thompson-tomo thompson-tomo changed the title docs: Define redirects & deployment for gh pages docs: Replace gh pages with redirects to otel.io registry Aug 7, 2026

@chalin chalin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @thompson-tomo. I tested the deployment on your fork and it works as well as GitHub Pages allows: browsers get redirected to the registry from any old URL, and the workflow is tidy (pinned SHAs, minimal permissions, persist-credentials: false).

One optional, non-blocking idea: per-gem redirects. All old URLs currently land on the generic registry page, where readers must re-find their gem. Two cheap upgrades:

  • Check in a static stub per gem at docs/github_pages/GEM_NAME/latest/index.html redirecting to https://rubydoc.info/gems/GEM_NAME. Being real files, these are served with a 200 status, and readers land on their gem's actual API docs.

  • In 404.html, parse the path to route deep links per gem:

    const m = location.pathname.match(/^\/opentelemetry-ruby\/([\w-]+)\//);
    location.replace(m ? `https://rubydoc.info/gems/${m[1]}`
                       : 'https://opentelemetry.io/ecosystem/registry/?language=ruby');

Either way, (RS)LGTM.

@thompson-tomo

Copy link
Copy Markdown
Contributor Author

Thanks @chalin, i have made the changes to the 404 page as suggested. I have not bothered with a static per gem page as most visitors will also be passing a version string & often also additional path arguments as that is what was previously used. Hence the static page wouldn't be hit.

Thanks again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

API reference "latest" pages should yield HTTP status 301 not 404

4 participants