Marko @ Mobile Coding Factory
Home of Mobile Coding Factory

Dynamic life with static web site

Last week I have been woking on my web page witch was until now, build with Hugo and deployed to the GitHub Pages. I have decided it would be better and easier to maintain if I switch to the Swift Publish - static site generator buld by John Sundell. I did not have much contenet so it seemed like right time to do this, before the task become to big to handle (I know this from personal experience). Good thing is that both Hugo and Pages are using Markdown for content representation. Bad thing is that everything else is different.

Installation and setup of the Swift Publish site are straightforward and it is done in a couple of console commands. After the initial setup, you will get a swift package file that you need to adjust with your site information. When this file is opened in the XCode, it will download all dependencies and you can already run it to see the initial version of the site. John has even provided a nice theme with a test page, so you get a “ready to go” site for free. The next step was to transfer all .md pages that I had from Hugo and to add/modify some custom tags that are presenting metadata information about the page. Since all site content was on GitHub already, I just stay with that approach (and make a separate repo, just in case) but instead of the GitHub Pages that I previously used for hosting, I have decided to try Google Firebase. Google is offering a service that is called Firebase Hosting and it can connect with GitHub Actions so you can publish your static website easily

The last step was to connect my existing domain with Firebase hosting, and this is also done in several easy steps. Here I needed to wait for certificates (a day or two) and to all be propagated so the redirection starts working, but after that everything just works!

Tags: