About that 'getting back' business ...

If you thought I’d gotten to the point where I could deploy this blog without incident, you’re sorely mistaken. And it’s evident from the way the rest of the night went.

You see, the thing I had been trying to do, adding this blog onto the website I already had deployed through another Github repo on Netlify, wasn’t as easy as the documentation would have led me to believe. Or rather, there were some gotchas.

When this blog was deployed on Netilfy by itself, everything seemed fine. The CSS seemed to load appropriately, the navigation seemed to be operating as it should, things looked fine.

Yesterday at 6:18 PM

1
2
3
4
5
[[redirects]]
from = "/blog/*"
to = "https://modest-yonath-e1349c.netlify.com/:splat"
status = 200
force = true

Result:
Hilariously, I forgot it looked this good - that could have saved me _so_ much time.

Grah! So, it looks good, except for the fact that the images aren’t loading. Hitting the website link takes me back to my main site, style’s the way I have it set. That’s got to be a quick fix!

Yesterday at 6:28 PM

_config.yml:

1
2
3
4
5
menu:
Home: ../
Archives: /archives
rss: /atom.xml
banner: "images/banner.jpg"

How did this happen?!

None of the links work. The CSS doesn’t work. What happened to that post with the images in it? (I can’t honestly remember when I started writing the post, but looking at the Netlify preview from before this, I must have started it before this point?

Yesterday at 7:49 PM

Okay, okay, maybe it’s a pathing issue, I think. Maybe it’s that I need to enable the post_asset_folder, maybe I need to move the images around. Ooh, index_generator, that sounds like a good thing. Says something about blog root – I should probably change that to /blog/!

_config.yml:

1
2
3
4
5
6
post_asset_folder: true
relative_link: true

...
index_generator:
path: "/blog"

You know, now I think Netlify’s playing a mean trick with time, since the blog deploys still don’t have the last post…. hm.

Looking good!

Most of the links work! And the styling’s working! The Website link reads as broken, however, and the endpoint is at /blog instead of at the root. Hm.

Yesterday at 7:55 PM

Changed the root back:

_config.yml:

1
2
index_generator:
path: ""

Yesterday at 8:00 PM

Here’s yesterday’s post!

How do you know?, you might ask.

Because at this point I was feeling confident enough to have responsible git messages. The last … several… have been a variation of Config, but this one literally says Second post.

Now we’re to the point where the first image comes into play on the blog side of things. Style looked okay, images were broken. Meh.

The rest of the night in pictures

Commits on blog repo:

Commits to Blog 1

Commits to Blog 2

Commits to Blog 3

Commits to Blog 4

Commits to Blog 5

Commits to Blog 6

Commits to Blog 7

Commits on website repo:

Commits to Website 1

Commits to Website 2

Commits to Website 3

It even got so bad that Netlify seemed to be trying to get me to take a break:

8:42 p.m. - Netlify is tired of my shenanigans

8.46 p.m. - Last build hasn't even started and I've tried starting one on the other repo

The Importance of Breaks

See how many commits were made in the course of three hours? Do you see how uninformative the majority of those commit messages were?

There’s a reason for that. I was getting frustrated with my inability to do a task that others had written about being easy, I’d let it get to my head that not accomplishing the task would brand me a failure, and I was too stubborn to stop. The only reason I did stop was it became clear there was no way I was going to solve the problem any time soon and I had to be up in less than 7 hours for work.

Bringing us to today …

_config.yml:

1
relative_link: false

What my blog looks like

WHY ARE YOU HAPPY ABOUT THIS?! you might ask. Because it looks terribly broken. All that lovely CSS is gone. Clicking any of the links takes you to a page not found. And you don’t have to take my word for it.

I’m happy because with it looking like that on the blog’s own route, it looked like The lovely CSS styled blog you're hopefully seeing now

Take-away:

  • If you find yourself struggling with something that other people have labeled as easy, don’t sweat it. Everyone’s experience is different - it’s dependent on what you’ve done before, what you’re familiar with, if you’ve solved similar problems in the past.
  • If your git commit messages get to be flippant and give no information about what kind of changes are contained within, that might be the time to take a break from it. I was pounding my head at this problem for literally hours yesterday when it literally only took a few minutes of time today to realize what the actual problem was.

I’m going to cross my fingers, make a hopefully more thorough commit message, and hope that adding this post doesn’t completely break everything all over again.

I promise future posts will not all be rambling and uninformative like this. I hope to start actually talking about programming in the near future. A few co-workers and I currently spend an hour every Wednesday going through https://exercism.io/ problems in the Elixir track to try to learn Elixir and I think it’d be fun to start documenting some of my experience with that, especially breaking down syntax and comparing it with different programming languages I’m more familiar with.

Anyway, ramble, ramble, ramble…

Catch you tomorrow, maybe!

- Amy