Also includes updates to address various pain points while simultaneously updating/improving the codebase.
Going further
For article pages, the title tag is generated by using a slugified version of the article title
Article titles should be short, sweet and clear; long title tag values are bad for SEO as the URL will be truncated (meaning it's less readable in search results)
The value for meta description tag on Articles is simply the same value as the article's summary text value
ESLint Fixes
There was a lot of holdover from when this project was a lerna project. I've since removed some code and moved things around related to linting, but it was not planned as part of this PR. Something started causing the builds to fail, presumably the bad configuration.
Nextjs Update
I've updated the site to Next 14 since I was previously on version 12. There were some unexpected errors obtaining things that should have existed; namely the summary field was always resulting in an undefined result, which was causing the build to fail. This no longer seems to happen after updating to version 14. The issue still happened, but due to an indirect error with NextJS pre-fetching the mocked endpoint for the unused contact form.
Notable changes
Commented out the unused Contact form
Nextjs apparently ensures the endpoint is reachable before it will build
This form is never shown right now and only links to a local-host endpoint, which is obviously not available when building the site
Strangely, this also appears to have been the cause for why summary was sometimes undefined for some pages - presumably, just some quirk with the order in which is built the pages, then ceases fetching data (total guess - all I know is the summary field being undefined stopped happening after this change)
PageLayout wraps the title value in an interpolated, single string - previously, it was leading to multiple children being passed to the title tag
No longer use next export as part of the build script
As part of this change, I also needed to add output: 'export' in the next.config.js file
export is simply not needed at all anymore for my setup
A
simplePR to leveragemeta
description tags per Google's recommendations here:Also includes updates to address various pain points while simultaneously updating/improving the codebase.
Going further
title
tag is generated by using a slugified version of the article titletitle
tag values are bad for SEO as the URL will be truncated (meaning it's less readable in search results)meta
description tag on Articles is simply the same value as the article'ssummary
text valueESLint Fixes
There was a lot of holdover from when this project was a
lerna
project. I've since removed some code and moved things around related to linting, but it was not planned as part of this PR. Something started causing the builds to fail, presumably the bad configuration.Nextjs Update
I've updated the site to Next 14 since I was previously on version 12. There were some unexpected errors obtaining things that should have existed; namely the
summary
field was always resulting in anundefined
result, which was causing the build to fail.This no longer seems to happen after updating to version 14.The issue still happened, but due to an indirect error with NextJS pre-fetching the mocked endpoint for the unused contact form.Notable changes
summary
was sometimes undefined for some pages - presumably, just some quirk with the order in which is built the pages, then ceases fetching data (total guess - all I know is thesummary
field being undefined stopped happening after this change)PageLayout
wraps thetitle
value in an interpolated, single string - previously, it was leading to multiple children being passed to thetitle
tagnext export
as part of thebuild
scriptAs part of this change, I also needed to addoutput: 'export'
in thenext.config.js
fileexport
is simply not needed at all anymore for my setup