Skip to content

Commit

Permalink
fix: add redirects for content no longer in the Gatsby toolchain
Browse files Browse the repository at this point in the history
* Tutorials should be accessed from ably.com/tutorials
* Client library development guides have moved to sdk.ably.com in #1608
  • Loading branch information
kennethkalmer committed Dec 6, 2022
1 parent 48e5679 commit c70cca7
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
13 changes: 13 additions & 0 deletions config/client-lib-development-guide-redirects.conf
Original file line number Diff line number Diff line change
@@ -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/;
2 changes: 2 additions & 0 deletions config/nginx.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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 %>
Expand Down
4 changes: 4 additions & 0 deletions config/website-redirects.conf
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit c70cca7

Please sign in to comment.