Skip to content

Commit 030bfa9

Browse files
authored
Merge pull request #324 from wpengine/chore-add-redirects-for-404s
Chore add redirects for 404s
2 parents 85e649f + 76d0c03 commit 030bfa9

File tree

2 files changed

+245
-0
lines changed

2 files changed

+245
-0
lines changed

faust.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,15 @@ class PostTypePolicyPlugin {
99
"apolloClientInMemoryCacheOptions",
1010
"faust",
1111
(inMemoryCacheObject) => {
12+
// Merge existing Faust typePolicies with with relayStylePagination for Posts
13+
const existingPolicies = inMemoryCacheObject.typePolicies || {};
14+
1215
return {
1316
...inMemoryCacheObject,
1417
typePolicies: {
18+
...existingPolicies,
1519
Query: {
20+
...existingPolicies.Query,
1621
fields: {
1722
posts: relayStylePagination(),
1823
},

redirects-old-site.mjs

Lines changed: 240 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,246 @@ const redirectsOldSite = [
637637
destination: "/docs/tutorial/learn-faust",
638638
permanent: true,
639639
},
640+
{
641+
source: "/tutorial/style.scss",
642+
destination: "/docs/tutorial/learn-faust/",
643+
permanent: true,
644+
},
645+
{
646+
source: "/dashboard",
647+
destination: "/",
648+
permanent: true,
649+
},
650+
{
651+
source: "/faust-tutorial",
652+
destination: "/docs/tutorial/learn-faust/",
653+
permanent: true,
654+
},
655+
{
656+
source: "/pages",
657+
destination: "/",
658+
permanent: true,
659+
},
660+
{
661+
source: "/wp-templates",
662+
destination: "/",
663+
permanent: true,
664+
},
665+
{
666+
source: "/blog/faust-update-mar-15-2023",
667+
destination: "/blog/sprint-30-update/",
668+
permanent: true,
669+
},
670+
{
671+
source: "/faust-update-mar-15-2023",
672+
destination: "/blog/sprint-30-update/",
673+
permanent: true,
674+
},
675+
{
676+
source: "/posts/testing",
677+
destination: "/blog/sprint-30-update/",
678+
permanent: true,
679+
},
680+
{
681+
source: "/docs/reference/use-blocks-theme/theme.json",
682+
destination: "/docs/reference/use-blocks-theme/",
683+
permanent: true,
684+
},
685+
{
686+
source: "/docs/reference/useLogout",
687+
destination: "/docs/reference/use-logout/",
688+
permanent: true,
689+
},
690+
{
691+
source: "/docs/reference/useBlocksTheme",
692+
destination: "/docs/reference/use-blocks-theme/",
693+
permanent: true,
694+
},
695+
{
696+
source: "/docs/reference/useLogin",
697+
destination: "/docs/reference/use-login/",
698+
permanent: true,
699+
},
700+
{
701+
source: "/docs/auth",
702+
destination: "/docs/how-to/authentication/",
703+
permanent: true,
704+
},
705+
{
706+
source: "/docs/next/getting-started",
707+
destination: "/docs/tutorial/learn-faust/",
708+
permanent: true,
709+
},
710+
{
711+
source: "/docs/reference/WordPressBlocksViewer",
712+
destination: "/docs/reference/wordpress-blocks-viewer/",
713+
permanent: true,
714+
},
715+
{
716+
source: "/docs/gutenberg/migration-from-wp-graphql-gutenberg",
717+
destination: "/docs/explanation/migrate-from-wp-graphql-gutenberg/",
718+
permanent: true,
719+
},
720+
{
721+
source: "/posts/hello-world",
722+
destination: "/",
723+
permanent: true,
724+
},
725+
{
726+
source: "/docs/plugin-system/creating-a-plugin",
727+
destination: "/docs/how-to/create-a-plugin/",
728+
permanent: true,
729+
},
730+
{
731+
source: "/docs/reference/getWordPressProps",
732+
destination: "/docs/reference/get-wordpress-props/",
733+
permanent: true,
734+
},
735+
{
736+
source: "/docs/faustwp/settings",
737+
destination: "/docs/how-to/basic-setup/",
738+
permanent: true,
739+
},
740+
{
741+
source: "/docs/gutenberg/getting-started",
742+
destination: "/docs/",
743+
permanent: true,
744+
},
745+
{
746+
source: "/docs/guides/typescript",
747+
destination: "/docs/",
748+
permanent: true,
749+
},
750+
{
751+
source: "/apollo",
752+
destination: "/docs/",
753+
permanent: true,
754+
},
755+
{
756+
source: "/docs/getting-started",
757+
destination: "/docs/tutorial/learn-faust/",
758+
permanent: true,
759+
},
760+
{
761+
source: "/docs/guides/custom-toolbar",
762+
destination: "/docs/how-to/customize-the-toolbar/",
763+
permanent: true,
764+
},
765+
{
766+
source: "/docs/templates",
767+
destination: "/docs",
768+
permanent: true,
769+
},
770+
{
771+
source: "/docs/faustwp/filters",
772+
destination: "/docs/reference/faust-plugin-system-filters/",
773+
permanent: true,
774+
},
775+
{
776+
source: "/docs/reference/getSitemapProps",
777+
destination: "/docs/reference/get-site-map-props/",
778+
permanent: true,
779+
},
780+
{
781+
source: "/docs/next/reference/getNextStaticProps",
782+
destination: "/docs/reference/get-next-static-props/",
783+
permanent: true,
784+
},
785+
{
786+
source: "/docs/plugin-system/filters",
787+
destination: "/docs/reference/faust-plugin-system-filters/",
788+
permanent: true,
789+
},
790+
{
791+
source: "/docs/guides/custom-post-types",
792+
destination: "/docs/how-to/setup-cpt-in-faustjs/",
793+
permanent: true,
794+
},
795+
{
796+
source: "/docs/reference/WordPressBlocksProvider",
797+
destination: "/docs/reference/wordpress-blocks-provider/",
798+
permanent: true,
799+
},
800+
{
801+
source: "/docs/going-to-production/deployment",
802+
destination: "/docs/explanation/deploy-your-app/",
803+
permanent: true,
804+
},
805+
{
806+
source: "/docs/reference/useAuth",
807+
destination: "/docs/how-to/authentication/",
808+
permanent: true,
809+
},
810+
{
811+
source: "/docs/gutenberg/tutorial/create-a-custom-block",
812+
destination: "/docs/how-to/custom-blocks/",
813+
permanent: true,
814+
},
815+
{
816+
source: "/gutenberg/tutorial/create-a-block-from-wordpress-core",
817+
destination: "/docs/how-to/custom-blocks/",
818+
permanent: true,
819+
},
820+
{
821+
source: "/docs/gutenberg/wp-graphql-content-blocks",
822+
destination: "/docs/how-to/rendering-blocks/",
823+
permanent: true,
824+
},
825+
{
826+
source: "/docs/next/guides/fetching-data",
827+
destination: "/how-to/query-data-in-nextjs-routes/",
828+
permanent: true,
829+
},
830+
{
831+
source: "/docs/faustwp/seed-query",
832+
destination: "/docs/reference/faust-plugin-system-filters/",
833+
permanent: true,
834+
},
835+
{
836+
source: "/docs/next/guides/auth",
837+
destination: "/docs/how-to/authentication/",
838+
permanent: true,
839+
},
840+
{
841+
source: "/docs/next/reference/getNextServerSideProps",
842+
destination: "/docs/reference/get-next-server-side-props/",
843+
permanent: true,
844+
},
845+
{
846+
source: "/docs/next/guides/project-walkthrough",
847+
destination: "/docs/tutorial/learn-faust/",
848+
permanent: true,
849+
},
850+
{
851+
source: "/docs/next/guides/post-page-previews",
852+
destination: "/docs/how-to/post-previews/",
853+
permanent: true,
854+
},
855+
{
856+
source: "/docs/how-to/react-components-to-blocks",
857+
destination: "/docs/how-to/rendering-blocks/",
858+
permanent: true,
859+
},
860+
{
861+
source: "/atlas",
862+
destination: "/",
863+
permanent: true,
864+
},
865+
{
866+
source: "/guide/UbCallToActionBlock",
867+
destination: "/docs/",
868+
permanent: true,
869+
},
870+
{
871+
source: "/docs/gutenberg/tutorial/create-a-block-from-third-party",
872+
destination: "/docs/",
873+
permanent: true,
874+
},
875+
{
876+
source: "/docs/templates",
877+
destination: "/docs/",
878+
permanent: true,
879+
},
640880
];
641881

642882
export default redirectsOldSite;

0 commit comments

Comments
 (0)