From 7142a54650133d066fb263557b6f06c0011b93b0 Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Fri, 30 Oct 2015 14:02:58 -0400 Subject: [PATCH] Support Jekyll 3.0 - Update to Jekyll v3.0 - Switch from Pygments.rb to Rouge for syntax highlighting - Minor updates to syntax.scss partial and theme documentation - Include jekyll-gist gem - Close #192, #218 --- .gitignore | 3 +- Gemfile | 7 +-- Gemfile.lock | 51 +++++---------------- README.md | 6 +-- _config.yml | 5 +- _posts/2013-08-16-code-highlighting-post.md | 8 ++-- _sass/{pygments.scss => syntax.scss} | 9 +++- assets/css/main.scss | 2 +- theme-setup/index.md | 4 +- 9 files changed, 36 insertions(+), 59 deletions(-) rename _sass/{pygments.scss => syntax.scss} (97%) diff --git a/.gitignore b/.gitignore index 3585775..3b77a2c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ _site *.sublime-workspace codekit-config.json node_modules -_asset_bundler_cache \ No newline at end of file +_asset_bundler_cache +.jekyll-metadata \ No newline at end of file diff --git a/Gemfile b/Gemfile index 08da02f..86dcd90 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,6 @@ source "https://rubygems.org" -gem 'jekyll', '2.5.3' -gem 'jekyll-sitemap' -gem 'octopress', '~> 3.0' \ No newline at end of file +gem "jekyll", "~> 3.0" +gem "jekyll-sitemap" +gem "jekyll-gist" +gem "octopress" \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index 7ebe08f..1683714 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,48 +2,28 @@ GEM remote: https://rubygems.org/ specs: addressable (2.3.8) - blankslate (2.1.2.4) - classifier-reborn (2.0.4) - fast-stemmer (~> 1.0) - coffee-script (2.4.1) - coffee-script-source - execjs - coffee-script-source (1.10.0) colorator (0.1) - execjs (2.6.0) faraday (0.9.2) multipart-post (>= 1.2, < 3) - fast-stemmer (1.0.2) ffi (1.9.10) - ffi (1.9.10-x64-mingw32) - ffi (1.9.10-x86-mingw32) - jekyll (2.5.3) - classifier-reborn (~> 2.0) + jekyll (3.1.1) colorator (~> 0.1) - jekyll-coffeescript (~> 1.0) - jekyll-gist (~> 1.0) - jekyll-paginate (~> 1.0) jekyll-sass-converter (~> 1.0) jekyll-watch (~> 1.1) kramdown (~> 1.3) - liquid (~> 2.6.1) + liquid (~> 3.0) mercenary (~> 0.3.3) - pygments.rb (~> 0.6.0) - redcarpet (~> 3.1) + rouge (~> 1.7) safe_yaml (~> 1.0) - toml (~> 0.1.0) - jekyll-coffeescript (1.0.1) - coffee-script (~> 2.2) jekyll-gist (1.4.0) octokit (~> 4.2) - jekyll-paginate (1.1.0) jekyll-sass-converter (1.4.0) sass (~> 3.4) - jekyll-sitemap (0.9.0) + jekyll-sitemap (0.10.0) jekyll-watch (1.3.1) listen (~> 3.0) kramdown (1.9.0) - liquid (2.6.3) + liquid (3.0.6) listen (3.0.5) rb-fsevent (>= 0.9.3) rb-inotify (>= 0.9) @@ -61,39 +41,30 @@ GEM titlecase octopress-deploy (1.3.0) colorator - octopress-escape-code (2.0.6) - octopress-hooks (~> 2.0) + octopress-escape-code (2.1.1) + jekyll (~> 3.0) octopress-hooks (2.6.1) jekyll (>= 2.0) - parslet (1.5.0) - blankslate (~> 2.0) - posix-spawn (0.3.11) - pygments.rb (0.6.3) - posix-spawn (~> 0.3.6) - yajl-ruby (~> 1.2.0) rb-fsevent (0.9.7) rb-inotify (0.9.5) ffi (>= 0.5.0) redcarpet (3.3.4) + rouge (1.10.1) safe_yaml (1.0.4) sass (3.4.21) sawyer (0.6.0) addressable (~> 2.3.5) faraday (~> 0.8, < 0.10) titlecase (0.1.1) - toml (0.1.2) - parslet (~> 1.5.0) - yajl-ruby (1.2.1) PLATFORMS ruby - x64-mingw32 - x86-mingw32 DEPENDENCIES - jekyll (= 2.5.3) + jekyll (~> 3.0) + jekyll-gist jekyll-sitemap - octopress (~> 3.0) + octopress BUNDLED WITH 1.11.2 diff --git a/README.md b/README.md index 381ded7..277b3dd 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ # Minimal Mistakes -**[Minimal Mistakes](http://mmistakes.github.io/minimal-mistakes)** is a two column responsive Jekyll theme perfect for powering your GitHub hosted blog. - -**Jekyll 3 Update:** A version of Minimal Mistakes compatible with Jekyll 3 can be found in the [`jekyll3` branch](https://github.com/mmistakes/minimal-mistakes/tree/jekyll3). GitHub Pages is [locked at version 2.4](https://pages.github.com/versions/) so some keep that in mind if you're trying to use 3.0 features that aren't supported there yet. +**[Minimal Mistakes](http://mmistakes.github.io/minimal-mistakes)** is a two column responsive Jekyll theme perfect for powering your GitHub hosted blog built. Compatible with Jekyll 3.0 and up. ## Minimal Mistakes is all about: @@ -20,6 +18,6 @@ See a [live version of Minimal Mistakes](http://mmistakes.github.io/minimal-mist ## Getting Started -Minimal Mistakes takes advantage of Sass and data files to make customizing easier. These features require Jekyll 2.x and will not work with older versions of Jekyll. +Minimal Mistakes takes advantage of Sass and data files to make customizing easier. These features require [Jekyll 2.x](https://github.com/mmistakes/minimal-mistakes/releases/tag/2.1.3) and will not work with older versions of Jekyll. To learn how to install and use this theme check out the [Setup Guide](http://mmistakes.github.io/minimal-mistakes/theme-setup/) for more information. diff --git a/_config.yml b/_config.yml index a6c14cd..a417232 100644 --- a/_config.yml +++ b/_config.yml @@ -9,19 +9,20 @@ url: permalink: /:categories/:title/ markdown: kramdown -highlighter: pygments +highlighter: rouge sass: sass_dir: _sass style: compressed gems: - jekyll-sitemap + - jekyll-gist kramdown: auto_ids: true footnote_nr: 1 entity_output: as_char toc_levels: 1..6 - use_coderay: false + enable_coderay: false # Octopress diff --git a/_posts/2013-08-16-code-highlighting-post.md b/_posts/2013-08-16-code-highlighting-post.md index 51a9434..1a03d21 100644 --- a/_posts/2013-08-16-code-highlighting-post.md +++ b/_posts/2013-08-16-code-highlighting-post.md @@ -3,7 +3,7 @@ layout: post title: Syntax Highlighting Post excerpt: "Demo post displaying the various ways of highlighting code in Markdown." tags: [sample post, code, highlighting] -modified: 2014-09-14 +modified: 2016-02-01 comments: true --- @@ -11,9 +11,9 @@ Syntax highlighting is a feature that displays source code, in different colors [^1]: -### Pygments Code Blocks +### Highlighted Code Blocks -To modify styling and highlight colors edit `/_sass/_pygments.scss`. +To modify styling and highlight colors edit `/_sass/syntax.scss`. {% highlight css %} #container { @@ -73,7 +73,7 @@ end ### Fenced Code Blocks -To modify styling and highlight colors edit `/_sass/_coderay.scss`. Line numbers and a few other things can be modified in `_config.yml`. Consult [Jekyll's documentation](http://jekyllrb.com/docs/configuration/) for more information. +To modify styling and highlight colors edit `/_sass/coderay.scss`. Line numbers and a few other things can be modified in `_config.yml`. Consult [Jekyll's documentation](http://jekyllrb.com/docs/configuration/) for more information. ~~~ css #container { diff --git a/_sass/pygments.scss b/_sass/syntax.scss similarity index 97% rename from _sass/pygments.scss rename to _sass/syntax.scss index ae684f6..7d8824f 100644 --- a/_sass/pygments.scss +++ b/_sass/syntax.scss @@ -1,11 +1,16 @@ /* ========================================================================== - Pygments.rb syntax highlighting + Syntax highlighting ========================================================================== */ +pre.highlight { + padding: 1em; +} + .highlight { background-color: #efefef; font-family: $code-font; - @include font(12); + @include font-rem(12); + line-height: 1.5; color: #333332; margin-bottom: 1.5em; @include rounded(4px); diff --git a/assets/css/main.scss b/assets/css/main.scss index 4e3fcb2..415db85 100644 --- a/assets/css/main.scss +++ b/assets/css/main.scss @@ -18,7 +18,7 @@ sitemap: false @import "normalize"; @import "site"; @import "typography"; -@import "pygments"; +@import "syntax"; @import "coderay"; @import "elements"; @import "forms"; diff --git a/theme-setup/index.md b/theme-setup/index.md index 429416f..d22fdaf 100644 --- a/theme-setup/index.md +++ b/theme-setup/index.md @@ -13,7 +13,7 @@ image: ## Installation -Minimal Mistakes now requires [Jekyll](http://jekyllrb.com/) 2.2+. Make sure to run `gem update jekyll` if you aren't on the latest version or `gem install jekyll` if this is your first time installing it. +Minimal Mistakes now requires [Jekyll](http://jekyllrb.com/) 3.0. Make sure to run `bundle update` if you aren't on the latest version to update all gem dependencies. If you are creating a new Jekyll site using Minimal Mistakes follow these steps: @@ -38,7 +38,7 @@ If you want to use Minimal Mistakes with an existing Jekyll site follow these st ## Running Jekyll -If `jekyll build` and `jekyll serve` throw errors you may have to run Jekyll with `bundle exec` instead. +The preferred method for running Jekyll is with `bundle exec`, but if you're willing to deal gem conflicts feel free to go cowboy with a `jekyll build` or `jekyll serve`. > In some cases, running executables without bundle exec may work, if the executable happens to be installed in your system and does not pull in any gems that conflict with your bundle. > -- 2.43.0