Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsoncg committed Feb 25, 2018
1 parent 66428e3 commit a5e441e
Show file tree
Hide file tree
Showing 11 changed files with 154 additions and 27 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ source "https://rubygems.org"

# This is the default theme for new Jekyll sites. You may change this to anything you like.
# gem "minima", "~> 2.0"
# gem "minimal-mistakes-jekyll", "~> 4.10.0"
gem "minimal-mistakes-jekyll", "~> 4.10.0"

# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
gem "github-pages", group: :jekyll_plugins
gem "jekyll-remote-theme"
#gem "jekyll-remote-theme"

# If you have any plugins, put them here!
group :jekyll_plugins do
Expand Down
14 changes: 12 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ GEM
execjs (2.7.0)
faraday (0.14.0)
multipart-post (>= 1.2, < 3)
ffi (1.9.22-x64-mingw32)
ffi (1.9.23-x64-mingw32)
forwardable-extended (2.6.0)
gemoji (3.0.0)
github-pages (177)
Expand Down Expand Up @@ -103,6 +103,8 @@ GEM
commonmarker (~> 0.17.6)
jekyll-commonmark (~> 1)
rouge (~> 2)
jekyll-data (1.0.0)
jekyll (~> 3.3)
jekyll-default-layout (0.1.4)
jekyll (~> 3.0)
jekyll-feed (0.9.2)
Expand Down Expand Up @@ -194,6 +196,14 @@ GEM
mini_portile2 (2.3.0)
minima (2.1.1)
jekyll (~> 3.3)
minimal-mistakes-jekyll (4.10.0)
jekyll (~> 3.6)
jekyll-data (~> 1.0)
jekyll-feed (~> 0.9.2)
jekyll-gist (~> 1.4)
jekyll-paginate (~> 1.1)
jekyll-sitemap (~> 1.1)
jemoji (~> 0.8)
minitest (5.11.3)
multipart-post (2.0.0)
net-dns (0.8.0)
Expand Down Expand Up @@ -237,7 +247,7 @@ PLATFORMS
DEPENDENCIES
github-pages
jekyll-feed (~> 0.6)
jekyll-remote-theme
minimal-mistakes-jekyll (~> 4.10.0)
tzinfo-data

BUNDLED WITH
Expand Down
11 changes: 6 additions & 5 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# You can create any custom variable you would like, and they will be accessible
# in the templates via {{ site.myvariable }}.

minimal_mistakes_skin : "air" # "air", "aqua", "contrast", "dark", "dirt", "neon", "mint", "plum", "sunrise"
minimal_mistakes_skin : "contrast" # "air", "aqua", "contrast", "dark", "dirt", "neon", "mint", "plum", "sunrise"
lang: en-GB
title: wilsoncg.net
email: [email protected]
Expand All @@ -29,7 +29,8 @@ logo: "/assets/nikita_golubev_computer.svg"
breadcrumbs: true

# Build settings
remote_theme: "mmistakes/minimal-mistakes"
remote_theme: mmistakes/minimal-mistakes
# theme: minimal-mistakes-jekyll

# Reading Files
include:
Expand Down Expand Up @@ -159,7 +160,7 @@ defaults:
values:
layout: single
author_profile: true
read_time: true
comments: # true
share: true
read_time: false
comments: false
share: false
related: true
6 changes: 6 additions & 0 deletions _data/navigation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# main links
main:
- title: "Projects"
url: /projects/
- title: "Posts"
url: /posts/
13 changes: 0 additions & 13 deletions _pages/about.md

This file was deleted.

14 changes: 14 additions & 0 deletions _pages/posts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
layout: archive
title: "Posts"
permalink: /posts/
author_profile: true
---

{% assign postsByYear = site.posts | group_by_exp:"post", "post.date | date: '%Y'" %}
{% for year in postsByYear %}
<h2 id="{{ year.name | slugify }}" class="archive__subtitle">{{ year.name }}</h2>
{% for post in year.items %}
{% include archive-single.html %}
{% endfor %}
{% endfor %}
2 changes: 1 addition & 1 deletion _pages/projects.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: single
layout: splash
title: "Projects"
permalink: /projects/
---
Expand Down
95 changes: 95 additions & 0 deletions _posts/2018-02-25-down-the-rabbit-hole.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
---
title: "Down the rabbit hole"
date: 2018-02-25 14:54:00 +0100
categories: jekyll
tags:
- jekyll
- jekyll themes
- remote themes
- github pages
- open source
- msys2
- mingw
- gcc
- curl
- libcurl
- winssl
---
"Just setup jekyll on your local windows 10 machine" they said, how hard can it be?

You've installed ruby, then jekyll. Created a site, found a theme, installed some gems, bundled something and now you have some html served up on port 4000. But wait a minute, now your console is full of warnings:

### Sass 4.0 deprecated function call

> DEPRECATION WARNING: Passing a string to call() is deprecated and will be illegal in Sass 4.0. Use call(get-function("mixin-exists")) instead.
Ok, that should be easily fixed, just update the theme:

> RUNTIME DEPENDENCIES (7):
>
> jekyll ~> 3.6
Oh right, you're running jekyll 3.5, time to upgrade! You better use ridk, and where's msys2:

> MSYS2 could not be found.
>
> Please download and install MSYS2 from https://msys2.github.io/
Fine, I'll just install msys2:

> :: msys2-runtime and catgets are in conflict. Remove catgets? [y/N]
Ah of course, the old catgets, who invited you to the party anyway.

> Dependency Error: Yikes! It looks like you don't have jekyll-remote-theme or one of its dependencies installed. In order to use Jekyll as currently configured , you'll need to install this gem. The full error message from Ruby is: 'Could n ot open library 'libcurl': (illegal characters) . Could not open libr ary 'libcurl.dll': (illegal characters) . Could not open library 'lib curl.so.4': (illegal characters) . Could not open library 'libcurl.so .4.dll': (illegal characters) ' If you run into trouble, you can find helpful resources at https://jekyllrb.com/help/!
{% highlight markdown %}
gem install jekyll-remote-theme
make "DESTDIR=" clean
'make' is not recognized as an internal or external command, operable program or batch file.
{% endhighlight %}

Oh now we're onto a whole new world of pain. So now I'm fiddling around with pacman, on msys2, updating gcc toolchains... Right, let's get back to the job at hand and install libcurl:

{% highlight markdown %}
gem install curb -- --with-curl-lib="C:/curl-7.27.0-devel-mingw32/bin" --with-curl-include="C:/curl-7.27.0-devel-mingw32/include"
This could take a while...
ERROR: Error installing curb:
Can't find libcurl or curl/curl.h (RuntimeError)
{% endhighlight %}

We're deep in the rabbit hole now, I've forgotten why we started this journey in the first place 🤔. Some downloading and extracting of various libcurl builds later, oh and renaming libcurl-x64.dll to libcurl.dll. Finally curb has done something. Let's try again:

{% highlight markdown %}
Remote Theme: Downloading https://codeload.github.com/mmistakes/minimal-mistakes/zip/master to C:/AppData/Local/Temp/jekyll-remote-theme-20171109-11884-1vg93xx.zip
ETHON: Libcurl initialized
SSL certificate problem: unable to get local issuer certificate
{% endhighlight %}

I see, of course you have to have the latest ca-cert-bundle.crt, oh and don't forget to set the environment variables:

{% highlight markdown %}
CURL_CA_BUNDLE=C:\Ruby\bin\ca-bundle.crt
SSL_CERT_FILE=C:\Ruby\bin\cacert.pem
{% endhighlight %}

Try again:

> SSL certificate problem: unable to get local issuer certificate
Oh right, still doesn't work. What exactly are those environment variables doing anyway:

[http://www.rubydoc.info/gems/ethon/0.5.0/Ethon/Easy](http://www.rubydoc.info/gems/ethon/0.5.0/Ethon/Easy)
> The CURLOPT_CAPATH function apparently does not work in Windows due to some limitation in openssl.
[https://stackoverflow.com/questions/37551409/configure-curl-to-use-default-system-cert-store](https://stackoverflow.com/questions/37551409/configure-curl-to-use-default-system-cert-store)
> OpenSSL does not support using the "CA certificate store" that Windows has on its own. If you want your curl build to use that cert store, you need to rebuild curl to use the schannel backend instead
This could be the end of the adventure, we could either download the OpenSSL source and rebuild on windows with WinSSL or find someone who has already built libcurl with WinSSL. Wait a minute, what's this:

[https://skanthak.homepage.t-online.de/curl.html](https://skanthak.homepage.t-online.de/curl.html)
> X:\> i386\curl.exe -V
>
> curl 7.58.0 (i386-pc-win32) libcurl/7.58.0 WinSSL zlib/1.2.11
Finally, 2 days later and I have a functioning jekyll setup on windows 10 with libcurl and jekyll-remote-theme. That was really fun 🤮.
Binary file added assets/splash-blue-min.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 0 additions & 4 deletions index.html

This file was deleted.

18 changes: 18 additions & 0 deletions index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
layout: splash
permalink: /
author_profile: false
header:
overlay_color: "#fff"
overlay_filter: "0.0"
overlay_image: /assets/splash-blue-min.png
cta_label: "Projects"
cta_url: "/projects/"
caption: "Sant Antoni de Portmany, Ibiza"
---

{% include feature_row id="intro" type="center" %}

Hi there, I'm Craig.

I'm a C#/.Net developer by day, but I like to work on other [projects]({{ site.baseurl }}{% link _pages/projects.md %}) in my free time.

0 comments on commit a5e441e

Please sign in to comment.