Skip to content

Commit

Permalink
Merge branch 'main' into deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
davwheat committed Jun 26, 2023
2 parents b2fa38a + 7004f52 commit d6d09b3
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 23 deletions.
52 changes: 34 additions & 18 deletions gatsby-node.js
Expand Up @@ -38,7 +38,6 @@ exports.onCreateWebpackConfig = ({ stage, rules, loaders, plugins, actions }) =>
'@functions': path.resolve(__dirname, 'src/functions'),
'@styles': path.resolve(__dirname, 'src/styles'),
'@templates': path.resolve(__dirname, 'src/templates'),
'@blog': path.resolve(__dirname, 'src/components/BlogComponents/MdxComponents'),
'@hooks': path.resolve(__dirname, 'src/hooks'),
},
},
Expand Down Expand Up @@ -89,22 +88,39 @@ function getMobileNetworkRedirects() {
}

function getBlogRedirects() {
const articles = [
'2021/07/18/welcome',
'2021/07/20/introduction-to-4g-and-lte',
'2021/07/24/lte-bands-and-duplex-modes',
'2021/08/04/mast-sectorisation-radiation-and-deployment-patterns',
'2021/08/21/ofdm-subcarriers-rb-in-4g-lte-and-5g',
'2021/10/11/speed-differences-high-low-frequencies',
'2021/12/22/lte-mimo',
'2022/01/24/o2-beacon-3-orion',
'2022/04/19/ee-nr-ca',
]
// const articles = [
// '2021/07/18/welcome',
// '2021/07/20/introduction-to-4g-and-lte',
// '2021/07/24/lte-bands-and-duplex-modes',
// '2021/08/04/mast-sectorisation-radiation-and-deployment-patterns',
// '2021/08/21/ofdm-subcarriers-rb-in-4g-lte-and-5g',
// '2021/10/11/speed-differences-high-low-frequencies',
// '2021/12/22/lte-mimo',
// '2022/01/24/o2-beacon-3-orion',
// '2022/04/19/ee-nr-ca',
// ]

return articles.map(a => ({
fromPath: `/blog/${a}`,
toPath: `https://mastdatabase.co.uk/blog/${a}`,
isPermanent: true,
statusCode: 308,
}))
// const staticRedirects = [
// {
// fromPath: '/blog',
// toPath: 'https://mastdatabase.co.uk/blog',
// isPermanent: true,
// statusCode: 308,
// },
// {
// fromPath: '/blog/:page',
// toPath: 'https://mastdatabase.co.uk/blog/:page',
// isPermanent: true,
// statusCode: 308,
// },
// ]

return [
{
fromPath: `/blog/*`,
toPath: `https://mastdatabase.co.uk/blog/*`,
isPermanent: true,
statusCode: 308,
},
]
}
2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"name": "personal-portfolio",
"private": true,
"description": "The personal website, blog, and portfolio of David Wheatley (@davwheat)",
"description": "The personal website and portfolio of David Wheatley.",
"version": "0.1.0",
"author": {
"name": "David Wheatley",
Expand Down
1 change: 0 additions & 1 deletion size-plugin.json

This file was deleted.

1 change: 1 addition & 0 deletions src/components/Links/ButtonLink.tsx
Expand Up @@ -22,6 +22,7 @@ const useStyles = makeStyles({
interface Props {
className?: string
onClick: React.MouseEventHandler<HTMLButtonElement>
children: React.ReactNode
}

const ButtonLink: React.FC<Props> = ({ children, className, onClick, ...props }) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/PageComponents/Footer.tsx
Expand Up @@ -125,7 +125,7 @@ export default function Footer() {

<nav className={classes.nav}>
<Link href="/">Home</Link>
<Link href="/blog">Blog</Link>
<Link href="https://mastdatabase.co.uk/blog">Blog</Link>
<Link href="/my-projects">My projects</Link>
<Link href="https://mastdatabase.co.uk">Networking</Link>
<a href="https://github.com/davwheat" rel="noopener noreferrer">
Expand Down
2 changes: 1 addition & 1 deletion src/components/PageComponents/Header.tsx
Expand Up @@ -267,7 +267,7 @@ function Header() {
<Link href="/">Home</Link>
<Link href="/my-projects">My projects</Link>
<Link href="https://mastdatabase.co.uk">Networking</Link>
<Link href="/blog">Blog</Link>
<Link href="https://mastdatabase.co.uk/blog">Blog</Link>
</nav>
</div>
</header>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/404.tsx
Expand Up @@ -12,7 +12,7 @@ const Links = [
{ text: 'Home Page', url: '/' },
{ text: 'My projects', url: '/my-projects' },
{ text: 'Networking', url: 'https://mastdatabase.co.uk' },
{ text: 'Blog', url: '/blog' },
{ text: 'Blog', url: 'https://mastdatabase.co.uk/blog' },
]

const NotFoundPage = ({ location }) => (
Expand Down

0 comments on commit d6d09b3

Please sign in to comment.