You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! We're using gatsby to build the documentation site for our Design System, and we are now trying to set up versioned documentation.
The concept look like this:
Every time we deploy to our main domain, the gatsby site is:: https://design.<domain>, everything works fine
For each release, we also copy that versions major to a azure blob storage, and we've mapped that blob in, so we can access the previous built sites on URLs like: https::/design.<domain>/v/11.
However, when accessing https::/design.<domain>/v/11, you are redirected to https::/design.<domain>/, and accessing for example https::/design.<domain>/v/11/components/buttons results in no data fetched with errors from the query engine, and I see that the url is pushState'd to https::/design.<domain>/components/button.
Is there a way to fix this? Or to support versioned sites?
If we can solve the redirect, we can use a .htaccess -file to handle the redirects, I think, like so:
Or, does gatsby include a better feature, that does not involve a rebuild? If it's a decent quick fix, we can live with a rebuild. If it results in manually changing all links for the versioned documentation, we've to pass that.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! We're using gatsby to build the documentation site for our Design System, and we are now trying to set up versioned documentation.
The concept look like this:
https://design.<domain>
, everything works finehttps::/design.<domain>/v/11
.However, when accessing
https::/design.<domain>/v/11
, you are redirected tohttps::/design.<domain>/
, and accessing for examplehttps::/design.<domain>/v/11/components/buttons
results in no data fetched with errors from the query engine, and I see that the url ispushState
'd tohttps::/design.<domain>/components/button
.Is there a way to fix this? Or to support versioned sites?
If we can solve the redirect, we can use a
.htaccess
-file to handle the redirects, I think, like so:Or, does gatsby include a better feature, that does not involve a rebuild? If it's a decent quick fix, we can live with a rebuild. If it results in manually changing all links for the versioned documentation, we've to pass that.
Beta Was this translation helpful? Give feedback.
All reactions