Using Publish to Build Your Own Blog Website (Series)

Using Publish to Build Your Own Blog Website (Series)

So as you may know, I have been in the software industry for about three years now and I have gotten a lot of experience with different technologies. Most of them being for web development and back end servers. Being proficient in JavaScript and Java has been a by product of that time in the field.

Things can get tiresome when you are using the same language over and over again and I was wondering if there was something else out there I can take up as a hobby while my work provided me the usual features. My friend Gio Noa pointed me to John Sundell's Publish framework which was open sourced late last year.

Publish uses Swift for website development, which was very surprising to me as almost everything I've seen in web has been JavaScript or PHP. I decided to take a look and see what the fuss was about. I was pleasantly surprised. This is something anyone familiar with Swift, CSS, and HTML can do. This website you're currently on was made with Publish!

This post will take you through the installation of Publish and show you how to get a local server running. Consider this post as a series which will get you closer and closer to getting a functional blogging website.

Installing Publish

Installing Publish is an easy affair on the command line. Here are the steps to do so:

$ git clone https://github.com/JohnSundell/Publish.git
$ cd Publish
$ make

These three commands will install Publish into your /usr/local/bin directory.

Run these next commands (Do not do this in the Publish directory) to create a new Publish project:

$ mkdir MyWebsite
$ cd MyWebsite
$ publish new

This will produce a Publish project which will do the basic scaffolding of your website. MyWebsite can be a name you choose. Do NOT use Site or Website as these are types used in Publish.

Let's take a look at our new website! It can be done with the following command;

$ publish run

You get a local server running on localhost:8000, open up your browser for choice and enter localhost:8080 into your URL bar.

You should have a basic website in a dark mode theme. Your new website is up and running! The next blog post will discuss the scaffolding of this new website.