From de28b660f550aa7cccd9ce4b6053e49025a2eba0 Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Fri, 30 Oct 2015 14:22:23 -0400 Subject: [PATCH] Support Jekyll 3.0 - Update to Jekyll v3.0 - Switch from Pygments.rb to Rouge for syntax highlighting - Include jekyll-gist gem - Update theme documentation --- .gitignore | 3 +- Gemfile | 8 +-- Gemfile.lock | 49 ++++--------------- README.md | 7 ++- _config.yml | 3 +- .../2013-08-16-code-highlighting-post.md | 6 +-- _posts/blog/2014-08-08-hello-world.md | 2 +- _posts/blog/2015-08-10-mathjax-example.md | 2 +- _sass/_syntax.scss | 12 +++-- theme-setup/index.md | 4 +- 10 files changed, 35 insertions(+), 61 deletions(-) diff --git a/.gitignore b/.gitignore index 3779a3def08..5b58b33f89d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ _site *.sublime-workspace codekit-config.json node_modules -.sass-cache \ No newline at end of file +.sass-cache +.jekyll-metadata diff --git a/Gemfile b/Gemfile index 2c72e131490..2e260b06f7b 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ source "https://rubygems.org" -gem 'jekyll', '2.5.3' -gem 'jekyll-sitemap' -gem 'rouge' -gem 'octopress', '~> 3.0' +gem "jekyll", "~> 3.0" +gem "jekyll-sitemap" +gem "jekyll-gist" +gem "octopress" diff --git a/Gemfile.lock b/Gemfile.lock index 4a77d10cb80..16837142850 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,47 +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) - 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) @@ -60,16 +41,10 @@ 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) @@ -81,19 +56,15 @@ GEM 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 DEPENDENCIES - jekyll (= 2.5.3) + jekyll (~> 3.0) + jekyll-gist jekyll-sitemap - octopress (~> 3.0) - rouge + octopress BUNDLED WITH 1.11.2 diff --git a/README.md b/README.md index 39f63f41164..e4cb2046449 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,10 @@ Looking for a simple, responsive, theme for your Jekyll powered blog? Well look no further. Here be **So Simple Theme**, the followup to [**Minimal Mistakes**](http://mmistakes.github.io/minimal-mistakes/) -- by designer slash illustrator [Michael Rose](http://mademistakes.com). -**Jekyll 3 Update:** A version of So Simple compatible with Jekyll 3 can be found in the [`jekyll3` branch](https://github.com/mmistakes/so-simple-theme/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. +## Notable features: -## So Simple Theme is all about: - -* Responsive templates. Looking good on mobile, tablet, and desktop. +* Compatible with Jekyll 3 and GitHub Pages. +* Responsive templates. Looks good on mobile, tablet, and desktop devices. * Gracefully degrading in older browsers. Compatible with Internet Explorer 9+ and all modern browsers. * Minimal embellishments and subtle animations. * Optional large feature images for posts and pages. diff --git a/_config.yml b/_config.yml index b65c1bbac9e..30e4f804294 100644 --- a/_config.yml +++ b/_config.yml @@ -11,12 +11,13 @@ url: http://localhost:4000 permalink: /:categories/:title/ markdown: kramdown -highlighter: pygments +highlighter: rouge sass: sass_dir: _sass style: compressed gems: - jekyll-sitemap + - jekyll-gist kramdown: auto_ids: true diff --git a/_posts/articles/2013-08-16-code-highlighting-post.md b/_posts/articles/2013-08-16-code-highlighting-post.md index 208184b20af..890af44d3e2 100644 --- a/_posts/articles/2013-08-16-code-highlighting-post.md +++ b/_posts/articles/2013-08-16-code-highlighting-post.md @@ -16,7 +16,7 @@ Syntax highlighting is a feature that displays source code, in different colors [^1]: -### Pygments or Rouge Code Blocks +### Highlighted Code Blocks To modify styling and highlight colors edit `/_sass/_syntax.scss`. @@ -78,8 +78,6 @@ 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. - ~~~ css #container { float: left; @@ -117,4 +115,4 @@ module Jekyll end end end -~~~ \ No newline at end of file +~~~ diff --git a/_posts/blog/2014-08-08-hello-world.md b/_posts/blog/2014-08-08-hello-world.md index 5a069b05005..ea0814c8c3f 100644 --- a/_posts/blog/2014-08-08-hello-world.md +++ b/_posts/blog/2014-08-08-hello-world.md @@ -3,7 +3,7 @@ layout: post title: "Hello World" modified: categories: blog -excerpt: +excerpt: "" tags: [] image: feature: diff --git a/_posts/blog/2015-08-10-mathjax-example.md b/_posts/blog/2015-08-10-mathjax-example.md index eaebdfd87ea..7014abe69af 100644 --- a/_posts/blog/2015-08-10-mathjax-example.md +++ b/_posts/blog/2015-08-10-mathjax-example.md @@ -3,7 +3,7 @@ layout: post title: "MathJax Example" modified: categories: blog -excerpt: +excerpt: "" tags: [] image: feature: diff --git a/_sass/_syntax.scss b/_sass/_syntax.scss index 9b66642d654..291d2346ad6 100644 --- a/_sass/_syntax.scss +++ b/_sass/_syntax.scss @@ -2,7 +2,11 @@ Syntax highlighting and formatting ========================================================================== */ -/* +pre.highlight { + padding: 1em; +} + +/* Pygments.rb and Rouge ========================================================================== */ @@ -81,7 +85,7 @@ .il { color: #009999 } /* Literal.Number.Integer.Long */ } -/* +/* Coderay ========================================================================== */ @@ -112,7 +116,7 @@ ol.CodeRay li { white-space: pre } .CodeRay { - .line-numbers, + .line-numbers, .no { background-color: #ececec; color: #aaa; @@ -178,7 +182,7 @@ ol.CodeRay li { white-space: pre } .preprocessor { color: #579; } .pseudo-class { color: #00c; font-weight: bold } .predefined-type { color: #074; font-weight: bold } - .reserved, + .reserved, .keyword { color: #000; font-weight: bold } .key { color: #808; } diff --git a/theme-setup/index.md b/theme-setup/index.md index 20c13b2d2e8..64d9511d589 100644 --- a/theme-setup/index.md +++ b/theme-setup/index.md @@ -16,7 +16,7 @@ General notes and suggestions for customizing **So Simple Theme**. ## Installation -So Simple now requires [Jekyll](http://jekyllrb.com/) 2.x. 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. +So Simple 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 So Simple follow these steps: @@ -41,7 +41,7 @@ If you want to use So Simple with an existing Jekyll site follow these steps: ## 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. >