Skip to content

Commit

Permalink
Merge pull request #257 from CivicActions/firebase-redirects
Browse files Browse the repository at this point in the history
Switch to Firebase redirects
  • Loading branch information
TheBoatyMcBoatFace authored Dec 10, 2024
2 parents 9055d6c + 67df677 commit fa554a3
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 160 deletions.
5 changes: 5 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@
"source": "/dkan",
"destination": "https://getdkan.org/",
"type": 301
},
{
"source": "/press/2024-01-16-CivicActions-Announces-Impact-Report/reports.civicactions.com/impact",
"destination": "https://reports.civicactions.com/impact",
"type": 301
}
],
"headers": [
Expand Down
1 change: 0 additions & 1 deletion gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ module.exports = {
`gatsby-plugin-sharp`,
`gatsby-plugin-sitemap`,
`gatsby-plugin-node-fields`,
`gatsby-plugin-client-side-redirect`,
`gatsby-remark-autolink-headers`,
{
resolve: 'gatsby-plugin-robots-txt',
Expand Down
122 changes: 0 additions & 122 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,128 +68,6 @@ exports.createPages = async ({ graphql, actions }) => {
throw result.errors;
}

const { createRedirect } = actions
createRedirect({
fromPath: "/case-study",
toPath: "/case-studies",
isPermanent: true,
redirectInBrowser: true,
})
createRedirect({
fromPath: "/case-study/cms-design-challenge-mvp",
toPath: "/case-studies/cms-design-challenge-mvp",
isPermanent: true,
redirectInBrowser: true,
})
createRedirect({
fromPath: "/case-study/va-cms-modernization",
toPath: "/case-studies/va-cms-modernization",
isPermanent: true,
redirectInBrowser: true,
})
createRedirect({
fromPath: "/case-study/digital-democracy",
toPath: "/case-studies",
isPermanent: true,
redirectInBrowser: true,
})
createRedirect({
fromPath: "/case-study/globalnet",
toPath: "/case-studies/globalnet-platform-support",
isPermanent: true,
redirectInBrowser: true,
})
createRedirect({
fromPath: "/case-study/eatfresh",
toPath: "/case-studies",
isPermanent: true,
redirectInBrowser: true,
})
createRedirect({
fromPath: "/case-study/fcc",
toPath: "/case-studies/fcc-website-modernization",
isPermanent: true,
redirectInBrowser: true,
})
createRedirect({
fromPath: "/case-study/hhs",
toPath: "/case-studies",
isPermanent: true,
redirectInBrowser: true,
})
createRedirect({
fromPath: "/case-study/msf",
toPath: "/case-studies",
isPermanent: true,
redirectInBrowser: true,
})
createRedirect({
fromPath: "/case-study/usva",
toPath: "/case-studies",
isPermanent: true,
redirectInBrowser: true,
})
createRedirect({
fromPath: "/case-study/cdt-foss",
toPath: "/case-studies",
isPermanent: true,
redirectInBrowser: true,
})
createRedirect({
fromPath: "/case-study/la-business-portal",
toPath: "/case-studies",
isPermanent: true,
redirectInBrowser: true,
})
createRedirect({
fromPath: "/case-study/lincs",
toPath: "/case-studies/dept-of-education-system-lifecycle-development-management",
isPermanent: true,
redirectInBrowser: true,
})
createRedirect({
fromPath: "/case-study/mta",
toPath: "/case-studies/nyc-metro-transit-digital-clocks",
isPermanent: true,
redirectInBrowser: true,
})
createRedirect({
fromPath: "/values",
toPath: "/",
isPermanent: true,
redirectInBrowser: true,
})
createRedirect({
fromPath: "/communities",
toPath: "/",
isPermanent: true,
redirectInBrowser: true,
})
createRedirect({
fromPath: "/approach",
toPath: "/",
isPermanent: true,
redirectInBrowser: true,
})
createRedirect({
fromPath: "/talks",
toPath: "https://medium.com/civicactions",
isPermanent: true,
redirectInBrowser: true,
})
createRedirect({
fromPath: "/dkan",
toPath: "https://getdkan.org/",
isPermanent: true,
redirectInBrowser: true,
})
createRedirect({
fromPath: "/press/2024-01-16-CivicActions-Announces-Impact-Report/reports.civicactions.com/impact",
toPath: "https://reports.civicactions.com/impact",
isPermanent: true,
redirectInBrowser: true,
})

const caseStudies = result.data.caseStudies.edges;
const CaseStudyTemplate = require.resolve('./src/templates/case-study.js');
caseStudies.forEach((caseStudy, index) => {
Expand Down
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@
"babel-preset-gatsby": "^3.12.0",
"gatsby": "^5.12.4",
"gatsby-awesome-pagination": "^0.3.8",
"gatsby-plugin-client-side-redirect": "^1.1.0",
"gatsby-plugin-google-gtag": "^5.12.1",
"gatsby-plugin-image": "^3.12.0",
"gatsby-plugin-manifest": "^5.12.0",
"gatsby-plugin-meta-redirect": "^1.1.1",
"gatsby-plugin-node-fields": "^3.1.0",
"gatsby-plugin-react-helmet": "^6.12.0",
"gatsby-plugin-robots-txt": "^1.8.0",
Expand Down
35 changes: 0 additions & 35 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5562,15 +5562,6 @@ fs-extra@^11.1.0, fs-extra@^11.1.1:
jsonfile "^6.0.1"
universalify "^2.0.0"

fs-extra@^7.0.0:
version "7.0.1"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9"
integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==
dependencies:
graceful-fs "^4.1.2"
jsonfile "^4.0.0"
universalify "^0.1.0"

fs-extra@^9.0.0:
version "9.1.0"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d"
Expand Down Expand Up @@ -5760,13 +5751,6 @@ [email protected]:
"@parcel/transformer-js" "2.8.3"
"@parcel/transformer-json" "2.8.3"

gatsby-plugin-client-side-redirect@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/gatsby-plugin-client-side-redirect/-/gatsby-plugin-client-side-redirect-1.1.0.tgz#6c83e749e24d4e8be195d4ee470b30bf4d58f336"
integrity sha512-ox3QpfQynNmH4SgBedMxi9WdEFVI/fQep0cpAu5mPSIQElIJmy+TF5fDZc56Ra+cvr/dz45sw+tUzE41aMlLfw==
dependencies:
fs-extra "^7.0.0"

gatsby-plugin-google-gtag@^5.12.1:
version "5.12.1"
resolved "https://registry.yarnpkg.com/gatsby-plugin-google-gtag/-/gatsby-plugin-google-gtag-5.12.1.tgz#9f6b767e50b51bcd932a5dca6fd7465f44736974"
Expand Down Expand Up @@ -5806,13 +5790,6 @@ gatsby-plugin-manifest@^5.12.0:
semver "^7.5.3"
sharp "^0.32.6"

gatsby-plugin-meta-redirect@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/gatsby-plugin-meta-redirect/-/gatsby-plugin-meta-redirect-1.1.1.tgz#058e8e53edff38dc44d3bb6153109d01c910f863"
integrity sha512-Oc4qgU3SlDUM9qoxIMKO+re2bdMs3/a2KXrfL65gb8XMLsHylBbveWtXZRhgjd2QDL/49RX4S9SEykuadRju2w==
dependencies:
fs-extra "^7.0.0"

gatsby-plugin-node-fields@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/gatsby-plugin-node-fields/-/gatsby-plugin-node-fields-3.1.0.tgz#f29c26e5e3b690aebd408494d357822ae3ae8c73"
Expand Down Expand Up @@ -7478,13 +7455,6 @@ json5@^2.1.2, json5@^2.2.0, json5@^2.2.1, json5@^2.2.3:
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283"
integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==

jsonfile@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb"
integrity sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==
optionalDependencies:
graceful-fs "^4.1.6"

jsonfile@^6.0.1:
version "6.1.0"
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae"
Expand Down Expand Up @@ -11875,11 +11845,6 @@ unist-util-visit@^4.0.0:
unist-util-is "^5.0.0"
unist-util-visit-parents "^5.1.1"

universalify@^0.1.0:
version "0.1.2"
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66"
integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==

universalify@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717"
Expand Down

0 comments on commit fa554a3

Please sign in to comment.