diff --git a/Gemfile b/Gemfile index 73259f5..ad5ff86 100644 --- a/Gemfile +++ b/Gemfile @@ -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 diff --git a/Gemfile.lock b/Gemfile.lock index 46ce9c8..0d1c829 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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) @@ -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) @@ -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) @@ -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 diff --git a/_config.yml b/_config.yml index bdc620a..9ceafda 100644 --- a/_config.yml +++ b/_config.yml @@ -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: craig@NOSPAMwilsoncg.net @@ -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: @@ -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 \ No newline at end of file diff --git a/_data/navigation.yml b/_data/navigation.yml new file mode 100644 index 0000000..ea434fb --- /dev/null +++ b/_data/navigation.yml @@ -0,0 +1,6 @@ +# main links +main: + - title: "Projects" + url: /projects/ + - title: "Posts" + url: /posts/ \ No newline at end of file diff --git a/_pages/about.md b/_pages/about.md deleted file mode 100644 index b63939b..0000000 --- a/_pages/about.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -layout: single -title: "About" -permalink: /about/ ---- - -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. - -This website is based on the basically-basic Jekyll theme, with some minor customizations. You can find the source code for this theme at: [jekyll-theme-basically-basic](https://github.com/mmistakes/jekyll-theme-basically-basic) - -[jekyll-organization]: https://github.com/jekyll diff --git a/_pages/posts.md b/_pages/posts.md new file mode 100644 index 0000000..206246b --- /dev/null +++ b/_pages/posts.md @@ -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 %} +

{{ year.name }}

+ {% for post in year.items %} + {% include archive-single.html %} + {% endfor %} +{% endfor %} \ No newline at end of file diff --git a/_pages/projects.md b/_pages/projects.md index 0d25929..4a5cef7 100644 --- a/_pages/projects.md +++ b/_pages/projects.md @@ -1,5 +1,5 @@ --- -layout: single +layout: splash title: "Projects" permalink: /projects/ --- diff --git a/_posts/2018-02-25-down-the-rabbit-hole.md b/_posts/2018-02-25-down-the-rabbit-hole.md new file mode 100644 index 0000000..486cb55 --- /dev/null +++ b/_posts/2018-02-25-down-the-rabbit-hole.md @@ -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 🤮. \ No newline at end of file diff --git a/assets/splash-blue-min.png b/assets/splash-blue-min.png new file mode 100644 index 0000000..6e93359 Binary files /dev/null and b/assets/splash-blue-min.png differ diff --git a/index.html b/index.html deleted file mode 100644 index a69ec90..0000000 --- a/index.html +++ /dev/null @@ -1,4 +0,0 @@ ---- -layout: home -author_profile: true ---- \ No newline at end of file diff --git a/index.md b/index.md new file mode 100644 index 0000000..60a3755 --- /dev/null +++ b/index.md @@ -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. \ No newline at end of file