I did a bunch of work on the new version of the blog (Jekyll 3, clean dark theme), converting
all but the middle thirty posts; but more importantly, I did some long-overdue automation of the
process using
RegReplace.
It took a little bit of doing, but the sequence of heavily regex’d find-and-replace tasks are now
a single Sublime command.
(Note: The percent sign is only escaped here to keep Jekyll from processing it.)
Default.sublime-commands
1
2
3
4
5
6
7
8
9
10
{
"caption": "Reg Replace: Convert Octopress 2 blog post to Jekyll3 custom",
"command": "reg_replace",
"args": {"replacements": ["remove_trailing_spaces", "octo_to_jekyll_center_img",
"octo_to_jekyll_center_img",
"octo_to_jekyll_single_cat", "octo_to_jekyll_two_cat",
"octo_to_jekyll_backtick_codeblock", "octo_to_jekyll_backtick_newline",
"octo_to_jekyll_backtick_plain",
"octo_to_jekyll_heading_newline", "remove_trailing_spaces"]}
},
Now I’m comfortable to say I can do the switch-over in the next week or so.
Throw it in the Cloud Every Thirteenth Day
One of the overdue items on this project is some sort of continuous integration. It’ll be awkward
with the legacy Windows server, but probably worth it. For now, though, let’s just get the ball
rolling with some test code linting.
GitLab CI
I’ve used
Travis CI quite a bit professionally, but since we’re on GitLab for this,
I thought I’d give their new CI offerings a try. I created a .gitlab-ci.yml based on their
example code:
I pushed it up, and… nothing. No errors, but no building. Experimented on some other repositories,
and it was just this one that was ignoring my CI config. After a lot of poking around, I found the
problem:
Project Settings -> Feature Visibility -> Repository -> Builds was set to Disabled, which I must
have thought was a good idea at some point. Once I made it anything else,
Rubocop was run as expected.
Rubocop
I had been writing a bunch of code in a general-purpose editor, without ever running it through a
linter, so the results are not unexpected:
As nostalgic as I sometimes am for “the good old days”, I feel terribly constrained by
eighty-character lines. One hundred seemed a nice round number, so I’ve settled on that.
Well, Rubocop’s certainly given us plenty of work to do. Tomorrow.