Issues!
So this page was originally just a test page to resolve my first issue in the blog. As transparency is going to play a big part in my work I want to show what problems I’ve faced and how I’ve solved them where possible.
Context
I’ve set this blog up thanks to the awesome work of Chad Baldwin via this link and hosted on GitHub Pages. I created the repo from template and published my first post yesterday with no issues at all.
The problem
Late last night I was drafting a new blog post about the Azure Cloud Shell, which I did not yet want to publish. I had this saved in the _posts folder of my repo, but as it was not yet ready to publish I set the title as 2022-xx-xx-the-azure-cloud-shell.md, assuming (due to the inbuilt logic of the web template displaying the publications in date order) that it wouldn’t show up at all.
I then wanted to edit my previous post from earlier in the day with some more information. Not having a mechanism to selectively push the repo with just the edit I decided to publish the new post as-is and assumed I could rectify it later. I pushed the repo, the actions ran in GitHub and.. nothing happened. The new post did not show, but neither did the edits to my exist post. I changed the draft post to the correct date formatting and tried again. Nothing. I scratched my head for 20 minutes and went to bed.
The resolution
I don’t think my actions really caused anything to break, though it would be interesting to see if not naming the ‘new’ post I was publishing ‘2022-xx-xx-etc..’ and just using the correct date would have kept everything working fine. I suspect it might have. I published a new post this morning as a test, and could see that the posts were displaying fine under ‘blog archive’. I remembered seeing this issue in the comments on the original link so swiftly followed the proposed resolution and hey presto - everything was working fine! Covered under GitHub issue #1
Where do we go from here?
Well, let’s start by not publishing draft articles with dodgy titles that break how the site functions shall we? I’ve added a new _drafts folder into the repo. Is this ideal? No, anyone with the right determination and nothing better to do will be able to see all my in-progress articles before they’re ready for the world to see if they know where to look. Do I really care? Not that much.
No idea at this point if the push that adds the _drafts folder into the repo will break everything again or not, if you’re reading this then it hasn’t (or it did and I’ve figured out how to fix it) - nothing like testing in production right?