Bootstrapping a Jekyll Blog using Gitlab

This is one of those odd posts that came about because I starting playing with one idea and something else came about all-together. It started with me considering blogging options besides WordPress. There’s lots of platforms out there, and some of them are quite good. I’m also looking for something that I can run for free. Right now my premium account is paid for until almost the end of the year. So I have plenty of time to consider other options.

One of those is Jekyll. It’s basically a set of templates and a script to build them into a website. It’s not like WordPress as it doesn’t have a database holding the pages. Jekyll’s files are just plain HTML. So there’s no need for the webserver to interpret a scripting language (PHP, etc.) or interface with a database. This makes the Jekyll-generated site portable to any webhost.

Of course this comes with a downside. There’s no fancy management interface or app to do the heavy lifting of getting a post out the door. The usual workflow is to create/edit the pages on your local machine then run Jekyll. This will create the finished HTML that can be uploaded to the server. In most examples I’ve seen either Git or rsync is used to do the actual moving. Jekyll also has an option to act as a local webserver so the pages can be previewed before the upload. Jekyll really came into its own when used with Github. There, Github Pages takes most of the work out of the running of Jekyll. The only thing the user needed to do was to write new pages and posts and then git push them. Github takes over and runs Jekyll and serves up the generated HTML.

Overall, this is a simple and fast way to get a site online. I have a GitHub account, but I don’t use it much as I do most of my personal work on GitLab now. I chose GitLab because it doesn’t charge for private repositories. But I found it can automatically keep a repository in sync with another. This is one place GitHub falls down. If you were to fork a project on GitHub (the upstream), there’s no way to synchronize that fork without pulling it down to the local machine and then pushing the changes to the fork in your GitHub account. Granted it’s the traditional way to do things, but when working away from my laptop using an iPad app it’s an impossible task. It’s much easier to mirror the GitHub repository to Gitlab and have it do a pull every hour. Then my Gitlab repository is always synchronized without any effort on my part.

Plus Gitlab has built-in continuous integration (CI) runners that are easy to configure. These features make it a platform that suits my needs better than GitHub.

So Jekyll then…

Continue reading “Bootstrapping a Jekyll Blog using Gitlab”

GitHub and Contributing to Pull Requests

I have a few projects up on GitHub, but it’s more of a “code storage” place than a “get work done” place. But the other night I ran across a project that I could make a quick contribution to. Besides helping out the project, I also learned a few things about how pull requests work. Including how to clone a pull request and work with the pull request author directly.

Continue reading “GitHub and Contributing to Pull Requests”

A Table of Contents Generator for Ulysses and MarkdownXL

I do all my writing in Ulysses. I also like to keep all of my files in its library. Since I started using it, the idea of having individual files scattered about my computer is just plain barbaric. The cost of this trade off is that if Ulysses doesn’t support a feature, I have to add raw HTML into the files. Normally this isn’t much of a problem. A bit HTML set off with ~~ isn’t distracting.

Markdown is great for writing text, but as a human-readable HTML front end its features are limited. It’s also the best generic text format that I’ve found. The one overwhelming advantage of markdown is that it’s easy to remember. It’s also the native language of Ulysses.1

Between markdown, HTML, and Ulysses, there’s no native way to create a a table of contents. There’s not even a recognized standard. Maybe in the future Ulysses2 might add this. But for now it’s something that has to be added manually. So with little a bit of scripting I came up with a workable solution.

Continue reading “A Table of Contents Generator for Ulysses and MarkdownXL”