I've finally gotten around to sorting out my blog, so that it's setup how I want it to be, with a theme I'm happy with as a starting point. Here's what I'm using.
I've tried loads of platforms for blogging, with variable success. But I've never been quite happy with the end result, for various reasons. Jekyll was close, but sometimes I wasn't on my dev machine, and didn't want to mess about with git / jekyll just to post something.
So now I'm running Ghost, hosting it myself in Azure, with a nice shiny cert from Let's Encrypt.
If you're at all interested, here's how I set the thing up..
Step 1: Get ghost running on azure.
There are a few ways to do this. I'm lazy, so I wanted the easiest way to do this. And you can't get easier than this
It's a fork of ghost on github, with added Deploy to Azure powers. Press the button, and away you go. Simples. Once it's done, you can "sync" in azure at any time to update to the latest ghost code, any files that you've added to the site (e.g. posts) won't be removed.
Step 2: Set things up in ghost
You don't need to set much up in azure once it's deployed, but if you want to run on your own domain, you need to tell ghost what it is. You need to add a setting or 2 to your application settings:
(And if you are going to use SSL, you also need a webSiteUrlSSL setting)
What about a nice theme?
Good plan, I grabbed the ghostwriter theme. There are a million ways to install that theme using Azure, here's a nice simple one:
- Go to the kudo site for your azure blog ([sitename].scm.azurewebsites.net), and head to the Cmd tool:
- Make your way to D:\home\site\wwwroot\content\themes
- Now drag your zip file containing your theme to the file list at the top, and it will magically upload for you.
- Now just unzip the file:
- You might need to restart the ghost site in azure, can't remember :)
- In the ghost admin, go and select your new theme.
Step 3: Get a SSL cert for free!
Ok - so this took me a bit of messing. What we're trying to do here is get our ghost blog on azure to have a SSL certificate from Let's Encrypt, as easily as possible. It's not so bad, here's what you need to do:
Follow the lovely Troy Hunt's instruction here .. BUT ...
When you get to the part where you're using the site extension to request the cert from lets encrypt, it's going to fail with a nasty error. That's because the site extension installs some files on your site, and lets encrypt tries to access them as part of the verification process, and it will fail because ghost will kick in and try to dynamically route the request. Eek. How to fix this? You just need to hack your web.config:
- Back in the kudo site CMD prompt, haed to the wwwroot folder, and click to edit the web.config
- In there, add the following to route the verification stuff properly:
- re-try the site extension to get the cert installed.
Annnd that's it.
I hope this is helpful to someone! I'm very happy with this setup, and I'm hoping it encourages me to do more blogging :)