From e46b1fc0a0e4239a897adc33fd3d52d0194f8e98 Mon Sep 17 00:00:00 2001 From: milldr Date: Thu, 5 Sep 2024 16:34:49 -0400 Subject: [PATCH] redirect links --- docusaurus.config.js | 19 +- package-lock.json | 7 +- redirects.js | 14 ++ redirects/docs.json | 6 + redirects/legacy.json | 435 +++++++++++++++++++++++++++++++++++++++++ redirects/refarch.json | 10 + 6 files changed, 475 insertions(+), 16 deletions(-) create mode 100644 redirects.js create mode 100644 redirects/docs.json create mode 100644 redirects/legacy.json create mode 100644 redirects/refarch.json diff --git a/docusaurus.config.js b/docusaurus.config.js index c067e7233..14a073a8a 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -3,6 +3,7 @@ const lightCodeTheme = require('prism-react-renderer').themes.vsDark; const darkCodeTheme = require('prism-react-renderer').themes.nightOwl; const fs = require('fs'); const path = require('path'); +const { redirects } = require("./redirects"); // Define the directory containing your CSS files const cssDirectory = path.resolve(__dirname, './src/css'); @@ -62,16 +63,6 @@ const config = { [ 'docusaurus-plugin-image-zoom', {}, ], - [ - '@docusaurus/plugin-client-redirects', { - redirects: [ - { - from: '/reference-architecture', - to: '/learn' - } - ], - }, - ], [ '@docusaurus/plugin-ideal-image', { @@ -99,7 +90,13 @@ const config = { { DSN: 'b022344b0e7cc96f803033fff3b377ee@o56155.ingest.us.sentry.io/4507472203087872', }, - ] + ], + [ + '@docusaurus/plugin-client-redirects', + { + redirects + }, + ], ], presets: [ diff --git a/package-lock.json b/package-lock.json index 3f666001f..8d20ec124 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6428,8 +6428,8 @@ "license": "MIT" }, "node_modules/custom-loaders": { - "resolved": "plugins/custom-loaders", - "link": true + "version": "0.0.0", + "resolved": "file:plugins/custom-loaders" }, "node_modules/cytoscape": { "version": "3.30.1", @@ -18860,9 +18860,6 @@ "type": "github", "url": "https://github.com/sponsors/wooorm" } - }, - "plugins/custom-loaders": { - "version": "0.0.0" } } } diff --git a/redirects.js b/redirects.js new file mode 100644 index 000000000..7afe1b244 --- /dev/null +++ b/redirects.js @@ -0,0 +1,14 @@ +const fs = require('fs'); + +function redirections() { + refarch = JSON.parse(fs.readFileSync('./redirects/refarch.json')); + docs = JSON.parse(fs.readFileSync('./redirects/docs.json')); + + redirects = refarch.concat(docs); + + return redirects; +} + +module.exports = { + redirects: redirections() +}; diff --git a/redirects/docs.json b/redirects/docs.json new file mode 100644 index 000000000..d8eb0ba62 --- /dev/null +++ b/redirects/docs.json @@ -0,0 +1,6 @@ +[ + { + "from": "/reference-architecture", + "to": "/learn" + } +] diff --git a/redirects/legacy.json b/redirects/legacy.json new file mode 100644 index 000000000..8ee5dd82a --- /dev/null +++ b/redirects/legacy.json @@ -0,0 +1,435 @@ +THESE ARE ALL BROKEN AND NEED TO BE UPDATED + +If included in redirect.js, it'll break the build +Manually fix each as you copy over to refarch.json + +[ + { + "from": "/reference-architecture/REFARCH-158", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-platform/decide-on-automated-backup-requirements" + }, + { + "from": "/reference-architecture/REFARCH-144", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-release-engineering/decide-on-database-seeding-strategy-for-ephemeral-preview-enviro" + }, + { + "from": "/reference-architecture/REFARCH-331", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-benchmark-compliance/decide-on-infrastructure-software-static-analysis-tools" + }, + { + "from": "/reference-architecture/REFARCH-470", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-benchmark-compliance/decide-on-technical-benchmark-framework" + }, + { + "from": "/reference-architecture/REFARCH-112", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-monitoring-platform/decide-on-maintenance-page-solution" + }, + { + "from": "/reference-architecture/REFARCH-294", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-monitoring-platform/decide-on-how-to-restrict-access-to-metrics-and-logs-in-datadog" + }, + { + "from": "/reference-architecture/REFARCH-406", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-release-engineering/decide-on-argocd-architecture" + }, + { + "from": "/reference-architecture/REFARCH-424", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-release-engineering/decide-on-strategy-for-developer-environments" + }, + { + "from": "/reference-architecture/REFARCH-253", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-release-engineering/decide-on-pipeline-strategy" + }, + { + "from": "/reference-architecture/REFARCH-307", + "to": "/reference-architecture/setup/compliance" + }, + { + "from": "/reference-architecture/REFARCH-419", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-release-engineering/decide-on-release-promotion-strategy" + }, + { + "from": "/reference-architecture/REFARCH-256", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-release-engineering/decide-on-customer-apps-for-migration" + }, + { + "from": "/reference-architecture/REFARCH-422", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-platform/decide-on-database-schema-migration-strategy" + }, + { + "from": "/reference-architecture/REFARCH-254", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-platform/decide-on-ecr-strategy" + }, + { + "from": "/reference-architecture/REFARCH-423", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-release-engineering/decide-on-seeding-strategy-for-staging-environments" + }, + { + "from": "/reference-architecture/REFARCH-421", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-release-engineering/decide-on-github-actions-workflow-organization-strategy" + }, + { + "from": "/reference-architecture/REFARCH-428", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-release-engineering/decide-on-hot-fix-or-rollback-strategy" + }, + { + "from": "/reference-architecture/REFARCH-467", + "to": "/reference-architecture/fundamentals/design-decisions/archived-decisions/decide-on-status-page-requirements" + }, + { + "from": "/reference-architecture/REFARCH-468", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-incident-management/decide-on-teams-for-escalations" + }, + { + "from": "/reference-architecture/REFARCH-405", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-release-engineering/decide-on-argocd-deployment-repo-architecture" + }, + { + "from": "/reference-architecture/REFARCH-420", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-release-engineering/decide-on-argocd-architecture" + }, + { + "from": "/reference-architecture/REFARCH-425", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-release-engineering/decide-on-strategy-for-preview-environments-e-g-review-apps" + }, + { + "from": "/reference-architecture/REFARCH-426", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-release-engineering/decide-on-strategy-for-continuous-integration" + }, + { + "from": "/reference-architecture/REFARCH-427", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-release-engineering/decide-on-kubernetes-application-artifacts" + }, + { + "from": "/reference-architecture/REFARCH-410", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-platform/decide-on-spacelift-administrative-stack-auto-deployment" + }, + { + "from": "/reference-architecture/REFARCH-343", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-benchmark-compliance/decide-on-kubernetes-platform-compliance-strategy" + }, + { + "from": "/reference-architecture/REFARCH-345", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-benchmark-compliance/decide-on-strategy-for-hardened-base-amis" + }, + { + "from": "/reference-architecture/REFARCH-34", + "to": "/reference-architecture/fundamentals/design-decisions/cold-start/decide-on-1password-strategy" + }, + { + "from": "/reference-architecture/REFARCH-111", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-monitoring-platform/decide-on-external-monitoring-solution" + }, + { + "from": "/reference-architecture/REFARCH-417", + "to": "/reference-architecture/fundamentals/design-decisions/cold-start/decide-on-aws-support" + }, + { + "from": "/reference-architecture/REFARCH-363", + "to": "/reference-architecture/fundamentals/design-decisions/archived-decisions/decide-on-rds-requirements" + }, + { + "from": "/reference-architecture/REFARCH-209", + "to": "/reference-architecture/fundamentals/design-decisions/cold-start/decide-on-regional-naming-scheme" + }, + { + "from": "/reference-architecture/REFARCH-237", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-platform/decide-on-how-to-support-tls" + }, + { + "from": "/reference-architecture/REFARCH-362", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-application-dependencies/decide-on-amazon-opensearch-service-elasticsearch-requirements" + }, + { + "from": "/reference-architecture/REFARCH-394", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-release-engineering/decide-on-self-hosted-github-runner-strategy" + }, + { + "from": "/reference-architecture/REFARCH-80", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-infrastructure/decide-vpc-peering-requirements-e-g-to-legacy-env" + }, + { + "from": "/reference-architecture/REFARCH-81", + "to": "/reference-architecture/fundamentals/design-decisions/cold-start/decide-on-secrets-management-strategy-for-terraform" + }, + { + "from": "/reference-architecture/REFARCH-53", + "to": "/reference-architecture/fundamentals/design-decisions/cold-start/decide-on-namespace-abbreviation" + }, + { + "from": "/reference-architecture/REFARCH-211", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-application-dependencies/decide-on-rds-technology-and-architecture" + }, + { + "from": "/reference-architecture/REFARCH-368", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-platform/decide-on-log-group-architecture" + }, + { + "from": "/reference-architecture/REFARCH-240", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-infrastructure/decide-on-organization-supernet-cidr-ranges" + }, + { + "from": "/reference-architecture/REFARCH-52", + "to": "/reference-architecture/fundamentals/design-decisions/cold-start/decide-on-infrastructure-repository-name" + }, + { + "from": "/reference-architecture/REFARCH-364", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-application-dependencies/decide-on-s3-bucket-requirements" + }, + { + "from": "/reference-architecture/REFARCH-217", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-infrastructure/decide-on-aws-account-vpc-subnet-cidr-strategy" + }, + { + "from": "/reference-architecture/REFARCH-365", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-application-dependencies/decide-on-elasticache-redis-requirements" + }, + { + "from": "/reference-architecture/REFARCH-79", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-platform/decide-on-transactional-email-smtp-provider-for-operational-email" + }, + { + "from": "/reference-architecture/REFARCH-51", + "to": "/reference-architecture/fundamentals/design-decisions/cold-start/decide-on-email-address-format-for-aws-accounts" + }, + { + "from": "/reference-architecture/REFARCH-46", + "to": "/reference-architecture/fundamentals/design-decisions/cold-start/decide-on-service-discovery-domain" + }, + { + "from": "/reference-architecture/REFARCH-411", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-release-engineering/decide-on-how-ecs-apps-are-deployed" + }, + { + "from": "/reference-architecture/REFARCH-91", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-platform/decide-how-to-distribute-docker-images" + }, + { + "from": "/reference-architecture/REFARCH-392", + "to": "/reference-architecture/fundamentals/design-decisions/cold-start/decide-on-opting-into-non-default-regions" + }, + { + "from": "/reference-architecture/REFARCH-50", + "to": "/reference-architecture/fundamentals/design-decisions/cold-start/decide-on-mfa-solution-for-aws-root-accounts" + }, + { + "from": "/reference-architecture/REFARCH-55", + "to": "/reference-architecture/fundamentals/design-decisions/cold-start/decide-on-aws-account-flavors-and-organizational-units" + }, + { + "from": "/reference-architecture/REFARCH-242", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-platform/decide-on-the-backup-aws-region-for-aurora-global-cluster" + }, + { + "from": "/reference-architecture/REFARCH-305", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-platform/decide-on-iam-roles-for-github-action-runners" + }, + { + "from": "/reference-architecture/REFARCH-355", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-benchmark-compliance/decide-on-log-retention-and-durability-architecture" + }, + { + "from": "/reference-architecture/REFARCH-384", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-platform/decide-on-waf-requirements-strategy" + }, + { + "from": "/reference-architecture/REFARCH-280", + "to": "/reference-architecture/fundamentals/design-decisions/cold-start/decide-on-terraform-version" + }, + { + "from": "/reference-architecture/REFARCH-208", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-platform/decide-on-hostname-scheme-for-service-discovery" + }, + { + "from": "/reference-architecture/REFARCH-54", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-platform/decide-on-vanity-branded-domain" + }, + { + "from": "/reference-architecture/REFARCH-471", + "to": "/reference-architecture/fundamentals/design-decisions/cold-start/decide-on-aws-organization-strategy" + }, + { + "from": "/reference-architecture/REFARCH-49", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-platform/decide-on-host-os-flavor-for-eks" + }, + { + "from": "/reference-architecture/REFARCH-210", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-platform/decide-whether-to-use-rds-iam-authentication" + }, + { + "from": "/reference-architecture/REFARCH-300", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-platform/decide-on-kubernetes-ingress-controller-s" + }, + { + "from": "/reference-architecture/REFARCH-236", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-platform/decide-on-eks-node-pool-architecture" + }, + { + "from": "/reference-architecture/REFARCH-207", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-platform/decide-on-helm-chart-repository-strategy" + }, + { + "from": "/reference-architecture/REFARCH-414", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-platform/decide-on-ecs-load-balancer-requirements" + }, + { + "from": "/reference-architecture/REFARCH-472", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-application-dependencies/todo-decide-on-rds-aurora-serverless-requirements" + }, + { + "from": "/reference-architecture/REFARCH-475", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-platform/decide-on-spacelift-worker-pool-architecture" + }, + { + "from": "/reference-architecture/REFARCH-479", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-application-dependencies/decide-on-documentdb-requirements" + }, + { + "from": "/reference-architecture/REFARCH-478", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-application-dependencies/decide-on-dynamodb-requirements" + }, + { + "from": "/reference-architecture/REFARCH-476", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-application-dependencies/decide-on-rds-aurora-db-cluster-requirements" + }, + { + "from": "/reference-architecture/REFARCH-477", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-application-dependencies/todo-decide-on-rds-instance-requirements" + }, + { + "from": "/reference-architecture/REFARCH-480", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-monitoring-platform/decide-on-whether-to-use-datadog-roles" + }, + { + "from": "/reference-architecture/REFARCH-484", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-platform/decide-on-the-application-service-log-destination-for-ecs" + }, + { + "from": "/reference-architecture/REFARCH-485", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-application-dependencies/decide-on-sftp-requirements" + }, + { + "from": "/reference-architecture/REFARCH-486", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-application-dependencies/decide-on-msk-requirements" + }, + { + "from": "/reference-architecture/REFARCH-487", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-platform/decide-on-transit-gateway-requirements" + }, + { + "from": "/reference-architecture/REFARCH-489", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-platform/decide-on-aws-backup-requirements" + }, + { + "from": "/reference-architecture/REFARCH-491", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-application-dependencies/decide-on-amazon-managed-workflows-for-apache-airflow-mwaa-requi" + }, + { + "from": "/reference-architecture/REFARCH-490", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-application-dependencies/decide-on-aws-emr-requirements" + }, + { + "from": "/reference-architecture/REFARCH-488", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-application-dependencies/decide-on-aws-managed-rabbitmq-requirements" + }, + { + "from": "/reference-architecture/REFARCH-493", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-platform/decide-on-automated-backup-requirements" + }, + { + "from": "/reference-architecture/REFARCH-202", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-platform/decide-on-email-address-for-cert-manager-support-emails" + }, + { + "from": "/reference-architecture/REFARCH-499", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-monitoring-platform/decide-on-datadog-private-locations" + }, + { + "from": "/reference-architecture/REFARCH-494", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-platform/decide-on-how-to-support-tls" + }, + { + "from": "/reference-architecture/REFARCH-514", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-release-engineering/decide-on-terraform-configuration-pattern-for-application-reposi" + }, + { + "from": "/reference-architecture/REFARCH-516", + "to": "/reference-architecture/how-to-guides/tutorials/enable-guardduty-for-eks-protection" + }, + { + "from": "/reference-architecture/REFARCH-517", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-infrastructure/decide-on-client-vpn-options" + }, + { + "from": "/reference-architecture/REFARCH-520", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-incident-management/decide-on-default-schedules" + }, + { + "from": "/reference-architecture/REFARCH-519", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-incident-management/decide-on-incident-ruleset" + }, + { + "from": "/reference-architecture/REFARCH-521", + "to": "/reference-architecture/fundamentals/design-decisions/decide-on-datadog-log-forwarding-requirements" + }, + { + "from": "/reference-architecture/REFARCH-522", + "to": "/reference-architecture/fundamentals/design-decisions/decide-on-terraform-state-backend-architecture" + }, + { + "from": "/reference-architecture/REFARCH-523", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-infrastructure/decide-on-vpc-nat-strategy" + }, + { + "from": "/reference-architecture/REFARCH-524", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-infrastructure/decide-on-vpc-network-traffic-isolation-policy" + }, + { + "from": "/reference-architecture/REFARCH-532", + "to": "/reference-architecture/fundamentals/design-decisions/decide-on-kms-requirements" + }, + { + "from": "/reference-architecture/REFARCH-530", + "to": "/reference-architecture/fundamentals/design-decisions/decide-on-cloudfront-requirements" + }, + { + "from": "/reference-architecture/REFARCH-525", + "to": "/reference-architecture/fundamentals/design-decisions/decide-on-cognito-requirements" + }, + { + "from": "/reference-architecture/REFARCH-527", + "to": "/reference-architecture/fundamentals/design-decisions/decide-on-kinesis-requirements" + }, + { + "from": "/reference-architecture/REFARCH-535", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-platform/decide-on-how-spacelift-will-use-external-private-modules" + }, + { + "from": "/reference-architecture/REFARCH-537", + "to": "/reference-architecture/fundamentals/design-decisions/decide-on-ci-cd-platform" + }, + { + "from": "/reference-architecture/REFARCH-536", + "to": "/reference-architecture/fundamentals/design-decisions/decide-on-strategy-for-continuous-deployment" + }, + { + "from": "/reference-architecture/REFARCH-538", + "to": "/reference-architecture/fundamentals/design-decisions/decide-on-strategy-for-managing-and-orchestrating-secrets" + }, + { + "from": "/reference-architecture/REFARCH-539", + "to": "/reference-architecture/fundamentals/design-decisions/foundational-monitoring-platform/decide-on-datadog-account-strategy" + }, + { + "from": "/reference-architecture/REFARCH-540", + "to": "/reference-architecture/fundamentals/design-decisions/decide-on-api-gateway-requirements" + }, + { + "from": "/reference-architecture/REFARCH-541", + "to": "/reference-architecture/fundamentals/design-decisions/decide-on-ipv4-and-ipv6-support" + }, + { + "from": "/reference-architecture/REFARCH-542", + "to": "/reference-architecture/fundamentals/design-decisions/decide-on-iam-roles-for-github-action-runners" + } +] diff --git a/redirects/refarch.json b/redirects/refarch.json new file mode 100644 index 000000000..186fdab4f --- /dev/null +++ b/redirects/refarch.json @@ -0,0 +1,10 @@ +[ + { + "from": "/reference-architecture/REFARCH-313", + "to": "/layers/accounts" + }, + { + "from": "/reference-architecture/REFARCH-56", + "to": "/layers/network/design-decisions/decide-on-primary-aws-region" + } +]