-1

I have a Jekyll blog at GitHub, and there are problems caused by an old version of the Rouge syntax highlighter. The issue can be seen in this post here1, for example. Note the red equals signs.

If I serve my site locally, I get the latest version of Rouge and I don't see those red equals signs (actually, I wrote the patch to fix that bug and my patch was released in Rouge 3.3.0). So that's how I know the dependencies are out of date on the GitHub side.

I have found loads of posts about how to update dependencies locally, but how can I update them in GitHub?


1 Thanks to an answer that was subsequently deleted, I was able to fix the red highlighting by using the JS syntax highlighter.

Alex Harvey
  • 14,494
  • 5
  • 61
  • 97
  • 1
    You could leave a comment at https://github.com/github/pages-gem/issues/601 – ashmaroli Apr 17 '19 at 16:29
  • @ashmaroli What if I just raised a PR to do it myself? https://github.com/github/pages-gem/pulls – Alex Harvey Apr 18 '19 at 01:43
  • I've no control nor say in the proceedings of that project. The max you can do is **wait** until your PR is merged and shipped.. There's already a PR at https://github.com/github/pages-gem/pull/597 – ashmaroli Apr 18 '19 at 04:27

1 Answers1

0

With some help from GitHub support, I have an answer to this finally.

The procedure is basically:

Create a Gemfile:

source 'https://rubygems.org'
gem 'github-pages', group: :jekyll_plugins

Install the bundle:

▶ bundle install

Build and serve the site locally:

▶ bundle exec jekyll serve

The site should then be available for preview at: http://127.0.0.1:4000/

Here's where it gets tricky.

Once you've built your site, you'll need to push the contents of the _site folder up to GitHub, but to the root of the master branch, replacing your existing source code.

Thus, it is recommended to firstly create a new branch e.g. develop where the blog source code can live. This develop branch can then be used to edit the site, and then the built contents can be pushed to the master branch when ready.

Alex Harvey
  • 14,494
  • 5
  • 61
  • 97