May 1, 2017
Today I’m launching an update to my website that I’ve been working on for a couple of weeks. The primary goal was to make it easier for me to post here more often so I can ween myself off of reliance on Twitter and Facebook to host my content. I may still post there from time to time, but my focus will be here from now on.
The new version of the site was built with Perfect, which made it very easy for me to get the ball rolling with the open source version of Swift. I love being able to write my server code in a familiar language, and it’s great to be able to test out this fantastic platform that the people over at Perfect have put together. If you haven’t checked it out yet I’d highly recommend looking into it if you’re the kind of person who loves putting stuff on the web or making APIs for mobile apps.
About six months ago before I started at Robin I made a small Swift module that would parse
.html blog posts, move them to the appropriate file locations with the rest of the page
html wrapped around it, and rebuild the
archive pages with the new posts. As I wrote in the original write up this was a very manual process where I had to add the blog files to the right directory, connect to my server, run the
blogBuild.swift module, and if anything went wrong I had to bring the published blog file back into the
draftsToPublish folder and run the script again after making changes. This process has been much simplified with a simple
PUT request to add a new post which also rebuilds the appropriate pages. And now most of the pages are no longer static so they can stay up to date without any manual tweaking, either by hand or script.
There’s still a few things I want to take care of to get this just right, but now it will be a much easier process of just editing some Swift files, which is now my go-to language for iOS & macOS projects in addition to servers.
I’ve also build an iOS app to help me write posts and publish them right to the site, but I’m thinking I’ll need to rethink it. My initial idea was to have a Markdown editor in the app potentially with share extensions so that I could quickly share links or images. The more I use it and other Markdown editors however the quicker I realize that it’ll be more work than I want to put in just to get it to where it’s actually enjoyable to use. So I think I’ll just adjust the API to take
.md files so I can write in Byword and have the server deal with everything else.
Overall I’m very pleased with the new site from a code perspective, and I’ll have some UI changes in the coming weeks that will hopfully deal with the last few gripes I have.