Skip to content
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

Add simple redirect for all past PRs #23

Open
patcon opened this issue Oct 21, 2024 · 1 comment
Open

Add simple redirect for all past PRs #23

patcon opened this issue Oct 21, 2024 · 1 comment

Comments

@patcon
Copy link
Member

patcon commented Oct 21, 2024

https://dev.to/steveblue/setup-a-redirect-on-github-pages-1ok7

Basically, just need to

<!DOCTYPE html>
<head>
  <meta charset="utf-8">
  <title>Redirecting to https://civictechto.github.io/polis-storybook/</title>
  <meta http-equiv="refresh" content="10; URL=https://civictechto.github.io/polis-storybook/>
  <link rel="canonical" href="https://civictechto.github.io/polis-storybook/">
</head>
<body>
  The GitHub <a href="https://github.com/civictechto/polis-storybook/pulls/18">pull request PR-18</a> corresponding to this sub-site has been closed. In 10 seconds, redirecting to main storybook website at <a href="https://civictechto.github.io/polis-storybook/">https://civictechto.github.io/polis-storybook/</a>
</body>
@patcon
Copy link
Member Author

patcon commented Oct 21, 2024

This should probably happen in JS (which can preserve query params, and therefore redirect to the right story), and fallback to HTML redirect with <noscript> tags: https://stackoverflow.com/a/29706770

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

No branches or pull requests

1 participant