New Blog Setup
Last week I set up a new blog with GatsbyJS using this tutorial and it has been an excellent starting point.
This week I tore it all down and rebuilt it from this GatsbyJS Advanced Starter. I took some effort to ensure no visible differences.
The change was pretty smooth except when I got to NPM Install, for these packages requiring one additional dependency.
"gatsby-remark-images": "^1.5.11",
"gatsby-plugin-sharp": "^1.6.7"
This additional dependency comes from the windows build tools which can be installed with this line.
npm install --global --production windows-build-tools
The vast majority of setting up the advanced starter just works, and consists of changing the ready-made config to match your own domain, your own email, your own twitter, etc.
One issue I found was the link to the RSS subscribe in the supplied Footer ReactJS component. This uses the gatsby-link package which allows GatsbyJS to intercept any links to the same site in the GatsbyJS link. The issue is that the “rss.xml” page is not part of the GatsbyJS site proper, so it will spin and then show a 404.
import Link from "gatsby-link";
const url = config.siteRss;
<Link to={url}>
<button>Subscribe</button>
</Link>
This can be fixed by doing this to open “rss.xml” in a new window. This can be tested by the subscribe button on the bottom right of this page.
<a href={url} target="_blank">
<button>Subscribe</button>
</a>