New Site, Who Dis?
It’s been a looong time coming, but I have finally migrated the old wordpress site to something easier to maintain and update. I also didn’t want to set up a script for ftp publishing and wanted to try and keep everything in a simple work flow.
There were quite a few challenges to this task, but at the end of the day, I’m able to easily update the site, work on small tweaks here and there, and post new content much easier than before. I ran into quite a few issues with the wordpress site.
- Unable to use automatic update, it would just fail with random file copy errors.
- I had to do manual updates and that required a database backup just in case.
- Because I couldn’t easily update, I became concerned about security.
I just couldn’t do it anymore. I also got hung up in all the analytics of setting up wordpress. There were so many things I could do, but at the end of the day, I don’t think I need much beyond some Google Analytics to make me feel warm inside.
The work
So how is this new site built? I learned a lot building learn-dojo, which is going to benefit from a lot of the work I’ve done on this site. As you could probably guess, that site, and this one are built with dojo. I had considered Gatsby, or 11ty. Of the two, I really liked 11ty, but I wanted to really dig in and have a bit more control over some stuff. Plus, I really like working with Dojo, and in particular its Build-time rendering, which is the Dojo way of static site generation.
The most work went into cleaning up the markdown files. There are wordpress plugins for exporting a site to markdown and downloading the images. They work fine, but over the years, I’ve had code syntax plugins break, and had to change from one to another, so there was quite a mix of ways that code blocks were written. This caused build errors I couldn’t track down right away and was a major headache. I was able to use markdownlint to help me fix major issues, after I flipped a couple of tables.
If you happen to find an error in a blog post, please make an issue here, maybe even a PR!
I also wanted to update all the remark and rehype tooling I was using from the learn-dojo
site. This was tricky, as remark recently made some updates that required me updating other plugins which may have had some odd issues. Plus, as I was cleaning up markdown, I wasn’t aware of some weird markdown breaking something, and it was quite a task to track some of these issues down. I still can’t get remark-frames to work, and I don’t know why. 🤷
The structure of the site is definitely inspired by Gatsby and Atomic Design, and I think I can simplify some of this even more.
What is really great with Dojo, is the ability to use blocks for Build-time rendering. This is where I use all the remark/rehype stuff to transform markdown to vdom, pull some meta info out and do all the work of turning markdown to pages. This gives me some fine-grained control to do certain things and I’m a huge fan of these kind of details.
Workflow
The workflow building and deploying this site is now pretty seamless for me.
- Publish to github repo
- Deploy to vercel from github
- Proxied through cloudflare
So I get all the benefits of vercel builds and cloudflare CDN and more. It’s amazing!
I have to give a shout out to hosting trends, which have hosted my site since around 2003 when it was just for shitposting. It’s a small shop, but the customer service has been superb. I stuck with them for almost 20 years for a reason.
Thank you
The upcoming content will still include plenty of geodev and ArcGIS JSAPI, but I’ll be including some more web dev and TypeScript content as well. So stay tuned for more. It’s so easy to post now!
If you want to keep up to date, you can subscribe to the rss. You could even sign up for the newsletter below. Emails should start going out again once I make some mailchimp updates.