I rebuilt this blog with Tropical
source link: https://www.bensmithett.com/i-rebuilt-this-blog-with-tropical/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
I rebuilt this blog with Tropical
This is the fourth incarnation of this blog. It started life as an ExpressionEngine experiment, then I jumped onto the static site bandwagon with Middleman before using Metalsmith to build something a little more bespoke.
Since then I've been poking away at Tropical, a little static site generator aimed at letting you use modern tools to build simple, old-fashioned websites.
I've used it on a few small greenfields projects, but this migration was a fun exercise in converting an existing project without making any visual changes.
Migrating the Markdown content
This was easy, the only thing I had to do was convert the existing YAML Front Matter to a plain old JavaScript export, thanks to MDX.
Migrating HTML and CSS
This part took all of 20 minutes. The old blog had some bespoke EJS templates and pretty minimal CSS that were easy to build out in Storybook as React + Fela components.
The rest
Migrating an existing project helped surface some of Tropical's rough edges and missing pieces, which I've fixed up with a quick flurry of releases including:
- Syntax highlighting for code in Markdown using prism-react-renderer
- Better collections
- Better date handling with Day.js
…and a couple of other tweaks.
Deploying and hosting
I migrated the old version of the blog from my GitHub Pages + Cloudflare approach to Netlify a while ago and haven't looked back. I like Netlify so much I put a big one-click deploy button on the Tropical repo.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK