-
Notifications
You must be signed in to change notification settings - Fork 145
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
Clean up redirects a little bit #753
Conversation
@@ -44,10 +44,10 @@ http { | |||
rewrite ^/(.*)//+(.*) $scheme://$http_host/$1/$2 permanent; # remove adjacent slashes in the middle of the URI | |||
rewrite ^/([^.]*[^/])$ $scheme://$http_host/$1/ permanent; # force a trailing slash except for files with an extension | |||
|
|||
# Permanent redirects (301) | |||
rewrite ^/docs/hostedservice/(.*)$ $scheme://$http_host/docs/en/hosted-service/$1 permanent; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those /docs/hostedservice/*
URLs must be really old; I couldn't find any reference to them anywhere. Also, we deprecated the HS, so I think it's safe to remove this rule.
rewrite ^/docs/en/substreams/(?!index\.).+$ https://substreams.streamingfast.io permanent; | ||
rewrite ^/docs/en/firehose/(?!index\.).+$ https://firehose.streamingfast.io permanent; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just moved these to the bottom of the list because they're different from the others (English-only).
rewrite ^/docs/([a-zA-Z][a-zA-Z])/managing/deprecating-a-subgraph/$ $scheme://$http_host/docs/$1/managing/transfer-and-deprecate-a-subgraph/ permanent; | ||
rewrite ^/docs/([a-zA-Z][a-zA-Z])/managing/transferring-subgraph-ownership/$ $scheme://$http_host/docs/$1/managing/transfer-and-deprecate-a-subgraph/ permanent; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are the redirects that should have been included in #741; my bad for not noticing in my review. :)
{ | ||
source: '/en/arbitrum-faq/', | ||
destination: '/en/arbitrum/arbitrum-faq/', | ||
permanent: true, | ||
}, | ||
{ | ||
source: '/en/querying/graph-client/', | ||
destination: '/en/querying/graph-client/README/', | ||
permanent: false, | ||
}, | ||
{ | ||
source: '/en/developing/graph-ts/', | ||
destination: '/en/developing/graph-ts/README/', | ||
permanent: false, | ||
}, | ||
{ | ||
source: '/en/developer/assemblyscript-api/', | ||
destination: '/en/developing/graph-ts/api/', | ||
permanent: true, | ||
}, | ||
{ | ||
source: '/en/developing/assemblyscript-api/', | ||
destination: '/en/developing/graph-ts/api/', | ||
permanent: true, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only reason we ever needed to include redirects here (in addition to nginx.conf)
is that there can still be links to the old URLs in the Markdown files. If that is the case, Next needs to be aware of them, otherwise the client-side router will link to a 404 (or maybe attempt to do a full page reload, which would be better, but still not ideal). But I hate having to maintain the same list of redirects in two places, so I went ahead and replaced all the old URLs still lingering around to the new ones, which allows us to remove these.
📦 Next.js Bundle Analysis for @graphprotocol/docsThis analysis was generated by the Next.js Bundle Analysis action. 🤖 Six Hundred Fifty-five Pages Changed SizeThe following pages changed size from the code in this PR compared to its base branch:
DetailsOnly the gzipped size is provided here based on an expert tip. First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If Any third party scripts you have added directly to your app using the The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored. |
This includes the missing redirects from #741 as well as some other redirect-related changes (will comment inline).