Skip to content

Commit

Permalink
Generate latest redirects for everything; handle latest redirects dif…
Browse files Browse the repository at this point in the history
…ferent in gatsby-node; manually add redirects for edb_plus and edb_pgadmin_linux_qs
  • Loading branch information
epbarger committed Feb 23, 2021
1 parent 2aeccc6 commit 8686aed
Show file tree
Hide file tree
Showing 581 changed files with 744 additions and 612 deletions.
30 changes: 14 additions & 16 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const {
buildProductVersions,
reportMissingIndex,
configureRedirects,
configureLegacyRedirects,
} = require('./src/constants/gatsby-node-utils.js');

const isBuild = process.env.NODE_ENV === 'production';
Expand Down Expand Up @@ -159,24 +160,8 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
...[removeNullEntries(node.frontmatter)],
);

// set up redirects
configureRedirects(node.fields.path, node.frontmatter.redirects, actions);

// safeguard against legacy redirects to stubs
if (!node.frontmatter.productStub) {
configureRedirects(
node.fields.path,
(node.frontmatter.legacyRedirects || []).concat(
node.frontmatter.legacyRedirectsGenerated || [],
),
actions,
{
redirectInBrowser: false,
isPermanent: false,
},
);
}

const { docType } = node.fields;
if (docType === 'doc') {
createDoc(node, productVersions, docs, actions);
Expand All @@ -201,6 +186,18 @@ const createDoc = (doc, productVersions, docs, actions) => {
});
}

// configure legacy redirects
if (!doc.frontmatter.productStub) {
configureLegacyRedirects({
toPath: doc.fields.path,
toLatestPath: isLatest && replacePathVersion(doc.fields.path),
redirects: (doc.frontmatter.legacyRedirects || []).concat(
doc.frontmatter.legacyRedirectsGenerated || [],
),
actions,
});
}

const navLinks = docs.filter(
(node) =>
node.fields.product === doc.fields.product &&
Expand Down Expand Up @@ -402,6 +399,7 @@ exports.createSchemaCustomization = ({ actions }) => {
type Frontmatter {
originalFilePath: String
indexCards: TileModes
legacyRedirects: [String]
}
enum TileModes {
Expand Down
33 changes: 0 additions & 33 deletions product_docs/README.md

This file was deleted.

1 change: 1 addition & 0 deletions product_docs/docs/ark/3.5/ark_admin/01_ark_whats_new.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "What's New"

legacyRedirectsGenerated:
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/3.5/ark_whats_new.html"
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/latest/ark_whats_new.html"
---

<div id="ark_whats_new" class="registered_link"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Supported Platforms"

legacyRedirectsGenerated:
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/3.5/ark_supported_platforms.html"
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/latest/ark_supported_platforms.html"
---

<div id="ark_supported_platforms" class="registered_link"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Ark Architecture Overview"

legacyRedirectsGenerated:
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/3.5/ark_architecture_overview.html"
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/latest/ark_architecture_overview.html"
---

<div id="ark_architecture_overview" class="registered_link"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Registering an Ark Cluster with PEM"

legacyRedirectsGenerated:
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/3.5/ark_registering_with_pem.html"
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/latest/ark_registering_with_pem.html"
---

<div id="ark_registering_with_pem" class="registered_link"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Ark Authentication Models"

legacyRedirectsGenerated:
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/3.5/ark_authentication_models.html"
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/latest/ark_authentication_models.html"
---

<div id="ark_authentication_models" class="registered_link"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Installing the Ark Console on AWS"

legacyRedirectsGenerated:
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/3.5/ark_installing_console_aws.html"
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/latest/ark_installing_console_aws.html"
---

<div id="ark_installing_console_aws" class="registered_link"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Installing the Ark Console on Azure"

legacyRedirectsGenerated:
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/3.5/ark_installing_console_azure.html"
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/latest/ark_installing_console_azure.html"
---

<div id="ark_installing_console_azure" class="registered_link"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Installing the Ark Console"

legacyRedirectsGenerated:
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/3.5/ark_installing_console.html"
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/latest/ark_installing_console.html"
---

<div id="ark_installing_console" class="registered_link"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Administrative Features of the EDB Ark Console"

legacyRedirectsGenerated:
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/3.5/ark_admin_features.html"
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/latest/ark_admin_features.html"
---

<div id="ark_admin_features" class="registered_link"></div>
Expand Down
1 change: 1 addition & 0 deletions product_docs/docs/ark/3.5/ark_admin/08_ark_admin_tab.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Using the Admin Tab"

legacyRedirectsGenerated:
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/3.5/ark_admin_tab.html"
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/latest/ark_admin_tab.html"
---

<div id="ark_using_admin_tab" class="registered_link"></div>
Expand Down
1 change: 1 addition & 0 deletions product_docs/docs/ark/3.5/ark_admin/09_ark_dba_tab.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Using the Ark DBA Tab"

legacyRedirectsGenerated:
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/3.5/ark_dba_tab.html"
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/latest/ark_dba_tab.html"
---

<div id="ark_dba_tab" class="registered_link"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Console Management"

legacyRedirectsGenerated:
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/3.5/ark_console_management.html"
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/latest/ark_console_management.html"
---

<div id="ark_console_management" class="registered_link"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Securing EDB Postgres Ark"

legacyRedirectsGenerated:
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/3.5/ark_securing_ark.html"
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/latest/ark_securing_ark.html"
---

<div id="ark_securing_ark" class="registered_link"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Creating a Statically Provisioned Image"

legacyRedirectsGenerated:
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/3.5/ark_statically_provisioned.html"
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/latest/ark_statically_provisioned.html"
---

<div id="ark_statically_provisioned" class="registered_link"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Ark Notifications"

legacyRedirectsGenerated:
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/3.5/ark_notifications.html"
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/latest/ark_notifications.html"
---

<div id="ark_notifications" class="registered_link"></div>
Expand Down
1 change: 1 addition & 0 deletions product_docs/docs/ark/3.5/ark_admin/14_ark_resources.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Ark Resources"

legacyRedirectsGenerated:
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/3.5/ark_resources.html"
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/latest/ark_resources.html"
---

<div id="ark_resources" class="registered_link"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "AWS IAM Role Permission Policy"

legacyRedirectsGenerated:
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/3.5/ark_aws_iam_role_permission_policy.html"
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/latest/ark_aws_iam_role_permission_policy.html"
---

<div id="ark_aws_iam_role_permission_policy" class="registered_link"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Amazon IAM Role Trust Relationship"

legacyRedirectsGenerated:
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/3.5/ark_aws_iam_role_trust_relationship.html"
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/latest/ark_aws_iam_role_trust_relationship.html"
---

<div id="ark_aws_iam_role_trust_relationship" class="registered_link"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Amazon Service User Security Policy"

legacyRedirectsGenerated:
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/3.5/ark_aws_service_user_security_policy.html"
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/latest/ark_aws_service_user_security_policy.html"
---

<div id="ark_aws_service_user_security_policy" class="registered_link"></div>
Expand Down
3 changes: 3 additions & 0 deletions product_docs/docs/ark/3.5/ark_admin/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ title: "Ark"

legacyRedirectsGenerated:
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/3.5/index.html"
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/latest/index.html"
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/3.5/conclusion.html"
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/latest/conclusion.html"
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/3.5/genindex.html"
- "/edb-docs/d/edb-postgres-ark-platform/user-guides/administrative-users-guide/latest/genindex.html"
---

**EDB Postgres Ark**
Expand Down
1 change: 1 addition & 0 deletions product_docs/docs/ark/3.5/ark_gsg/01_whats_new.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "What's New"

legacyRedirectsGenerated:
- "/edb-docs/d/edb-postgres-ark-platform/installation-getting-started/getting-started-guide/3.5/whats_new.html"
- "/edb-docs/d/edb-postgres-ark-platform/installation-getting-started/getting-started-guide/latest/whats_new.html"
---

<div id="ark_whats_new" class="registered_link"></div>
Expand Down
1 change: 1 addition & 0 deletions product_docs/docs/ark/3.5/ark_gsg/02_ark_overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "EDB Ark - Overview"

legacyRedirectsGenerated:
- "/edb-docs/d/edb-postgres-ark-platform/installation-getting-started/getting-started-guide/3.5/ark_overview.html"
- "/edb-docs/d/edb-postgres-ark-platform/installation-getting-started/getting-started-guide/latest/ark_overview.html"
---

<div id="ark_overview" class="registered_link"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Accessing the Ark Console"

legacyRedirectsGenerated:
- "/edb-docs/d/edb-postgres-ark-platform/installation-getting-started/getting-started-guide/3.5/accessing_ark_console.html"
- "/edb-docs/d/edb-postgres-ark-platform/installation-getting-started/getting-started-guide/latest/accessing_ark_console.html"
---

<div id="accessing_ark_console" class="registered_link"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "The Dashboard Tab"

legacyRedirectsGenerated:
- "/edb-docs/d/edb-postgres-ark-platform/installation-getting-started/getting-started-guide/3.5/ark_dashboard_tab.html"
- "/edb-docs/d/edb-postgres-ark-platform/installation-getting-started/getting-started-guide/latest/ark_dashboard_tab.html"
---

<div id="ark_dashboard_tab" class="registered_link"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "The Clusters Tab"

legacyRedirectsGenerated:
- "/edb-docs/d/edb-postgres-ark-platform/installation-getting-started/getting-started-guide/3.5/ark_clusters_tab.html"
- "/edb-docs/d/edb-postgres-ark-platform/installation-getting-started/getting-started-guide/latest/ark_clusters_tab.html"
---

<div id="ark_clusters_tab" class="registered_link"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "The Backups Tab"

legacyRedirectsGenerated:
- "/edb-docs/d/edb-postgres-ark-platform/installation-getting-started/getting-started-guide/3.5/ark_backups_tab.html"
- "/edb-docs/d/edb-postgres-ark-platform/installation-getting-started/getting-started-guide/latest/ark_backups_tab.html"
---

<div id="ark_backups_tab" class="registered_link"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "The User Tab"

legacyRedirectsGenerated:
- "/edb-docs/d/edb-postgres-ark-platform/installation-getting-started/getting-started-guide/3.5/ark_user_tab.html"
- "/edb-docs/d/edb-postgres-ark-platform/installation-getting-started/getting-started-guide/latest/ark_user_tab.html"
---

<div id="ark_user_tab" class="registered_link"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Using the Ark Console"

legacyRedirectsGenerated:
- "/edb-docs/d/edb-postgres-ark-platform/installation-getting-started/getting-started-guide/3.5/using_ark_console.html"
- "/edb-docs/d/edb-postgres-ark-platform/installation-getting-started/getting-started-guide/latest/using_ark_console.html"
---

<div id="using_ark_console" class="registered_link"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Creating a Server Cluster"

legacyRedirectsGenerated:
- "/edb-docs/d/edb-postgres-ark-platform/installation-getting-started/getting-started-guide/3.5/creating_a_cluster.html"
- "/edb-docs/d/edb-postgres-ark-platform/installation-getting-started/getting-started-guide/latest/creating_a_cluster.html"
---

<div id="creating_a_cluster" class="registered_link"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Connecting to an EDB Ark Cluster"

legacyRedirectsGenerated:
- "/edb-docs/d/edb-postgres-ark-platform/installation-getting-started/getting-started-guide/3.5/connecting_to_cluster.html"
- "/edb-docs/d/edb-postgres-ark-platform/installation-getting-started/getting-started-guide/latest/connecting_to_cluster.html"
---

<div id="connecting_to_cluster" class="registered_link"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Managing Backups and Recovery"

legacyRedirectsGenerated:
- "/edb-docs/d/edb-postgres-ark-platform/installation-getting-started/getting-started-guide/3.5/manage_backup_recovery.html"
- "/edb-docs/d/edb-postgres-ark-platform/installation-getting-started/getting-started-guide/latest/manage_backup_recovery.html"
---

<div id="manage_backup_recovery" class="registered_link"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Automatic Failover"

legacyRedirectsGenerated:
- "/edb-docs/d/edb-postgres-ark-platform/installation-getting-started/getting-started-guide/3.5/automatic_failover.html"
- "/edb-docs/d/edb-postgres-ark-platform/installation-getting-started/getting-started-guide/latest/automatic_failover.html"
---

<div id="automatic_failover" class="registered_link"></div>
Expand Down
1 change: 1 addition & 0 deletions product_docs/docs/ark/3.5/ark_gsg/09_manual_scaling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Manual Scaling"

legacyRedirectsGenerated:
- "/edb-docs/d/edb-postgres-ark-platform/installation-getting-started/getting-started-guide/3.5/manual_scaling.html"
- "/edb-docs/d/edb-postgres-ark-platform/installation-getting-started/getting-started-guide/latest/manual_scaling.html"
---

<div id="manual_scaling" class="registered_link"></div>
Expand Down
1 change: 1 addition & 0 deletions product_docs/docs/ark/3.5/ark_gsg/10_automatic_scaling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Automatic Scaling"

legacyRedirectsGenerated:
- "/edb-docs/d/edb-postgres-ark-platform/installation-getting-started/getting-started-guide/3.5/automatic_scaling.html"
- "/edb-docs/d/edb-postgres-ark-platform/installation-getting-started/getting-started-guide/latest/automatic_scaling.html"
---

<div id="automatic_scaling" class="registered_link"></div>
Expand Down
1 change: 1 addition & 0 deletions product_docs/docs/ark/3.5/ark_gsg/11_load_balancing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Load Balancing"

legacyRedirectsGenerated:
- "/edb-docs/d/edb-postgres-ark-platform/installation-getting-started/getting-started-guide/3.5/load_balancing.html"
- "/edb-docs/d/edb-postgres-ark-platform/installation-getting-started/getting-started-guide/latest/load_balancing.html"
---

<div id="load_balancing" class="registered_link"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Customizing Your Cluster"

legacyRedirectsGenerated:
- "/edb-docs/d/edb-postgres-ark-platform/installation-getting-started/getting-started-guide/3.5/customizing_cluster.html"
- "/edb-docs/d/edb-postgres-ark-platform/installation-getting-started/getting-started-guide/latest/customizing_cluster.html"
---

<div id="customizing_cluster" class="registered_link"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Database Management"

legacyRedirectsGenerated:
- "/edb-docs/d/edb-postgres-ark-platform/installation-getting-started/getting-started-guide/3.5/database_management.html"
- "/edb-docs/d/edb-postgres-ark-platform/installation-getting-started/getting-started-guide/latest/database_management.html"
---

<div id="database_management" class="registered_link"></div>
Expand Down
Loading

0 comments on commit 8686aed

Please sign in to comment.