Background
As I’ve said in Jekyll Blog Page Build Warning, GitHub Pages have upgraded to 3.0.
Problem
The Twitter theme for every post in Blog 2 was gone, but the home page and the archive page still looked good.
I viewed Jekyll-Bootstrap’s issue list. The
“{{ ASSET_PATH }}” in the title of
issue #295 caught my eyes. Feeling that changing
_config.yml
is too troublesome and prone to error, I clicked some
links for related web pages, such as
a relevant page in Jekyll’s documentation, but I didn’t know
what to do.
Solution
It turns out that this issue is the same as issue #290. The status of this issue is closed because some ways of fixing the problem have been shared. Since qh’s fix has received positive comments, I adopt his approach.
Before learning more Git commands this summer, I would change
this manually. However, fearing that I would make a typo, I
seek an automatic way to apply the changes in _includes/JB/setup
.
I searched “git apply patch” on Google, and reached this Stack Overflow question eventually. The command
$ curl https://github.com/JustinTulloss/zeromq.node/pull/47.patch > /tmp/47.patch
gave me a file (without EOF) in /tmp
.
<html><body>You are being <a href="https://patch-diff.githubusercontent.com/raw/JustinTulloss/zeromq.node/pull/47.patch">redirected</a>.</body></html>
I then tried using git apply
.
[owner@localhost ~/blog2]$ git apply --stat /tmp/47.patch
fatal: unrecognized input
Even though I added the --stat
option, the bash still said that it’s
fatal
. I tried googling “git apply fatal”, but I couldn’t see
anything useful. The third answer to this Stack Overflow question
cleared my doubts: by comparing the date of the answers, one knows
that patch-diff.githubusercontent.com
should be used instead.
Since the reputation of the owner of the second answer is higher,
not having enough time to check their differences, I used git am
instead of git apply --check
. Finally, everything went smooth and
the git push
was successful. Originally, I intended to leave a
short Git comment message with a few helpful links. However,
everything went so good that I didn’t have the chance to do that in
the Git repository for Blog 2. Therefore, I recorded my thoughts
here.