diff --git a/.circleci/config.yml b/.circleci/config.yml index c5c665b83f..a84991f398 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -151,6 +151,15 @@ jobs: ./bin/assert-success.sh /docs/quick-start-guide ./bin/assert-redirect.sh /docs/quick-start-guide/ \ https://localhost/docs/quick-start-guide + - run: + name: Test website redirects + command: | + ./bin/assert-redirect.sh /tutorials https://ably.com/tutorials + - run: + name: Test client library redirects + command: | + ./bin/assert-redirect.sh /client-lib-development-guide \ + https://sdk.ably.com/builds/ably/specification/main/ workflows: test_branch: diff --git a/config/client-lib-development-guide-redirects.conf b/config/client-lib-development-guide-redirects.conf new file mode 100644 index 0000000000..ce3b4129aa --- /dev/null +++ b/config/client-lib-development-guide-redirects.conf @@ -0,0 +1,13 @@ +# These pages for the client library development guides used to be accessible +# on docs.ably.com, but have moved to sdk.ably.com and are no longer available +# in the Gatsby toolchain. + +/client-lib-development-guide/comet https://sdk.ably.com/builds/ably/specification/main/comet/; +/client-lib-development-guide/encryption https://sdk.ably.com/builds/ably/specification/main/encryption/; +/client-lib-development-guide/feature-prioritisation https://sdk.ably.com/builds/ably/specification/main/feature-prioritisation/; +/client-lib-development-guide/features https://sdk.ably.com/builds/ably/specification/main/features/; +/client-lib-development-guide/protocol https://sdk.ably.com/builds/ably/specification/main/protocol/; +/client-lib-development-guide/test-api https://sdk.ably.com/builds/ably/specification/main/test-api/; +/client-lib-development-guide/versioning https://sdk.ably.com/builds/ably/specification/main/versioning/; +/client-lib-development-guide/websocket https://sdk.ably.com/builds/ably/specification/main/websocket/; +/client-lib-development-guide https://sdk.ably.com/builds/ably/specification/main/; diff --git a/config/nginx.conf.erb b/config/nginx.conf.erb index 06bc597d1a..59fe555a6c 100644 --- a/config/nginx.conf.erb +++ b/config/nginx.conf.erb @@ -51,6 +51,8 @@ http { # Creates a map of redirects for us map $uri $redirected_url { default "none"; + include website-redirects.conf; + include client-lib-development-guide-redirects.conf; <% if File.exists?(File.dirname(__FILE__) + '/nginx-redirects.conf') %> include nginx-redirects.conf; <% end %> diff --git a/config/website-redirects.conf b/config/website-redirects.conf new file mode 100644 index 0000000000..a3535b00af --- /dev/null +++ b/config/website-redirects.conf @@ -0,0 +1,4 @@ +# Redirect pages that used to be available in the nanoc toolchain, back +# to the website where people should be accessing them + +~^/tutorials(.*)$ https://ably.com/tutorials$1;