Miracles of Technology

Last night after dinner, Tozier and I hooked up our computers via iMessage. At first we text chatted. Then he shared my screen, which automatically provides a voice connection. Him in Ann Arbor, me in Pinckney. Just works.

“I didn’t like it either.” – Bessie

I remember when if you wanted to work with somebody on the same thing you had to go out to the barn, harness up old Bessie, and ride in the wagon, man and boy, through thick and thin, uphill 22 miles to Ann Arbor, then uphill 22 miles back. It was hell.

Anyway, it was nearly as good a session as being there and in some ways better.

What we did

Bill cloned the repo and changed some articles and his Jekyll regenerated on save. This was an important clue. So I spent some time updating all my gems. Which means I spent some time installing XCode’s Command Line Tools. I still saw no regeneration when I saved the file.

We went down the rathole of assuming that I had a bad plugin. (In retrospect, his success should have told us that it couldn’t be the plugin, because it worked on his machine.)

After a while, we discovered that it was more strange than we had realized. Some files, when saved, triggered regeneration, and some did not. All in the same main Articles folder, each in their own subfolder.

My new folders are named things like 2014-12-22-rspec-1. (I was hoping that would help me keep track when I have 400 articles in here. I can see now that it won’t. But I digress.) I thought it might be that that format was confusing Jekyll into thinking that the articles were posts. I don’t use posts, just pages. So we renamed some folders. Renaming a folder triggered a regeneration! Jekyll wasn’t broken internally, it was just ignoring those folders!

That theory was quickly dashed. Inside the renamed folder, saving the file still didn’t wake up Jekyll. Renaming the folder, did.

We finally went through all my top level articles, saving each one, and seeing whether Jekyll regenerated. It did, except for two, in folders 2014-12-22-rspec-1, and the current one I was working on, 2014-12-22-rspec-2. We found that renaming the folders not to have the YYYY-mm-dd pattern didn’t fix it. We stumbled on renaming the folder to something like ‘mumble’. Saving the article now worked.

It wasn’t our plugin. It wasn’t the article contents. It was the folder name. In particular, it was the ‘rspec’ part of the name.

Tozier takes a wild leap

Bill began to cackle – I hate when he cackles – and opened Jekyll’s _config.yml file. It has a section for folder and file names in which article should not be searched for, as follows:

- spec
- search-snippet.txt

The intention of that spec line was to cause Jekyll not to generate files inside the spec folder. It has that effect. It also causes Jekyll’s file watcher to ignore any changes in that folder when it comes to regeneration.

And it also causes changes to any file in any folder containing that string not to cause regeneration. When regeneration happens, Jekyll will process files in 2014-12-22-rspec-1, but the file watcher won’t trigger.

We changed the line above to spec/* and all was well. I filed an issue on Jekyll.

No Prize

No prize will be awarded, but next time I see Tozier, I’ll draw something on his hand if he wants me to.