Skip to content

Commit

Permalink
feat(docs): add routing rules for deprecated links (resolves #394, re…
Browse files Browse the repository at this point in the history
…solves #423)
  • Loading branch information
liranp committed Nov 2, 2020
1 parent 402cf06 commit fbd32dc
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/scripts/aliases.js
@@ -0,0 +1,18 @@
/**
* Routing rules.
*
* All routes below are either deprecated or obsolete, and exist for backward
* compatibility purposes only.
*/
export const aliases = {
"/getting-started-create-an-elastigroup-cluster-from-an-existing-asg-auto-scaling-group":
"/elastigroup/tutorials/elastigroup-tasks/join-an-existing-asg",

"/getting-started-create-an-elastigroup-cluster-from-an-existing-elb":
"elastigroup/tutorials/elastigroup-tasks/join-an-existing-elb",

"/elastigroup-for-aws/tutorials/stateful-tutorials/create-a-stateful-elastigroup-from-scratch":
"/elastigroup/tutorials/elastigroup-tasks/create-a-stateful-elastigroup-from-scratch",

"/container-management/kubernetes/kubernetes-concepts/spotinst-labels/": "/ocean/features/labels-and-taints",
};
4 changes: 4 additions & 0 deletions src/scripts/docsify.js
@@ -1,4 +1,5 @@
import { pageEditPlugin, tocPlugin, featherPlugin, searchFocusPlugin } from "./plugins";
import { aliases } from "./aliases";

window.$docsify = {
// General
Expand All @@ -13,6 +14,9 @@ window.$docsify = {
// ---------------------------------------------------------------------------
routerMode: "history", // default: 'hash'
alias: {
// maintains backward compatibility
...aliases,

// ensures there's only ever one single sidebar (see #301)
"/.*/_sidebar.md": "/_sidebar.md",
},
Expand Down

0 comments on commit fbd32dc

Please sign in to comment.