Skip to content

Commit

Permalink
Added logs for redirects (#667)
Browse files Browse the repository at this point in the history
Update yarn package manager to version 4.4.0
Also added logs for redirects
  • Loading branch information
bradystroud authored Aug 21, 2024
1 parent 5179ea6 commit b9fcd77
Show file tree
Hide file tree
Showing 6 changed files with 4,479 additions and 5,575 deletions.
893 changes: 0 additions & 893 deletions .yarn/releases/yarn-4.0.2.cjs

This file was deleted.

925 changes: 925 additions & 0 deletions .yarn/releases/yarn-4.4.0.cjs

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.0.2.cjs

supportedArchitectures:
os:
- 'darwin'
- 'linux'
- 'win32'
cpu:
- 'x64'
- 'x86'
- 'arm'
- 'arm64'
- 'ia32'
- x64
- x86
- arm
- arm64
- ia32
libc:
- 'glibc'
- 'musl'
- glibc
- musl
os:
- darwin
- linux
- win32

yarnPath: .yarn/releases/yarn-4.4.0.cjs
10 changes: 6 additions & 4 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -483,14 +483,16 @@ exports.createPages = async function ({ actions, graphql }) {

// if person has a nickname (even if they are alumni), create a redirect from it
if (person.nicknamePath && person.path !== person.nicknamePath) {
const nicknamePath = person.nicknamePath.replace(
alumniPrefix.replace('/', ''),
''
);
actions.createRedirect({
fromPath: person.nicknamePath.replace(
alumniPrefix.replace('/', ''),
''
),
fromPath: nicknamePath,
toPath: `/${person.path}`,
isPermanent: true,
});
console.log('Creating redirect from ' + nicknamePath + ' to ' + person.path);
}

if (person.path.includes('alumni')) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,5 +124,5 @@
"resolutions": {
"sharp": "0.33.2"
},
"packageManager": "yarn@4.0.2"
"packageManager": "yarn@4.4.0"
}
Loading

0 comments on commit b9fcd77

Please sign in to comment.