Skip to content
This repository has been archived by the owner on Aug 28, 2019. It is now read-only.

Commit

Permalink
Support Jekyll 3.0
Browse files Browse the repository at this point in the history
- Update to Jekyll v3.0
- Switch from Pygments.rb to Rouge for syntax highlighting
- Include jekyll-gist gem
- Update theme documentation
- Close #123
  • Loading branch information
mmistakes committed Feb 2, 2016
1 parent 17de6b7 commit 35ff7b4
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 110 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -5,4 +5,5 @@ _site
codekit-config.json
node_modules
Gemfile.lock
.sass-cache
.sass-cache
.jekyll-metadata
8 changes: 5 additions & 3 deletions Gemfile
@@ -1,5 +1,7 @@
source "https://rubygems.org"

gem 'jekyll', '2.5.3'
gem 'jekyll-sitemap'
gem 'octopress', '~> 3.0'
gem "jekyll", "~> 3.0"
gem "jekyll-sitemap"
gem "octopress"
gem "jekyll-paginate"
gem "jekyll-gist"
51 changes: 12 additions & 39 deletions Gemfile.lock
Expand Up @@ -2,48 +2,29 @@ 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)
Expand All @@ -61,39 +42,31 @@ 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-paginate
jekyll-sitemap
octopress (~> 3.0)
octopress

BUNDLED WITH
1.11.2
4 changes: 2 additions & 2 deletions Gruntfile.js
Expand Up @@ -8,8 +8,8 @@ module.exports = function(grunt) {
},
all: [
'Gruntfile.js',
'assets/js/*.js',
'assets/js/plugins/*.js',
'!assets/js/*.js',
'!assets/js/plugins/*.js',
'!assets/js/scripts.min.js'
]
},
Expand Down
6 changes: 4 additions & 2 deletions _config.yml
Expand Up @@ -37,10 +37,12 @@ bing_verify:
# http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
timezone: America/New_York
future: true
highlighter: pygments
highlighter: rouge
markdown: kramdown
gems:
- jekyll-sitemap
- jekyll-paginate
- jekyll-gist
sass:
sass_dir: _sass
style: compressed
Expand All @@ -56,7 +58,7 @@ kramdown:
footnote_nr: 1
entity_output: as_char
toc_levels: 1..6
use_coderay: true
enable_coderay: false

coderay:
coderay_line_numbers: nil
Expand Down
14 changes: 4 additions & 10 deletions _posts/2013-08-16-code-highlighting-post.md
Expand Up @@ -2,7 +2,7 @@
layout: post
title: Syntax Highlighting Post
description: "Demo post displaying the various ways of highlighting code in Markdown."
modified: 2014-12-23
modified: 2016-02-01
tags: [sample post, code, highlighting]
image:
feature: abstract-10.jpg
Expand All @@ -14,9 +14,9 @@ Syntax highlighting is a feature that displays source code, in different colors

[^1]: <http://en.wikipedia.org/wiki/Syntax_highlighting>

### 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 {
Expand Down Expand Up @@ -115,10 +115,4 @@ module Jekyll
end
end
end
~~~

### GitHub Gist Embed

An example of a Gist embed below.

{% gist mmistakes/6589546 %}
~~~
4 changes: 4 additions & 0 deletions _sass/_pygments.scss → _sass/_syntax.scss
@@ -1,3 +1,7 @@
pre.highlight {
padding: 1em;
}

.highlight {
margin-bottom: 1.5em;
@include font(12);
Expand Down
14 changes: 6 additions & 8 deletions about/index.md
Expand Up @@ -6,28 +6,26 @@ image:
credit: dargadgetz
creditlink: http://www.dargadgetz.com/ios-7-abstract-wallpaper-pack-for-iphone-5-and-ipod-touch-retina/
comments: false
modified: 2014-12-24
modified: 2016-02-01
---

They say three times the charm, so here is another free responsive Jekyll blog theme for you. I've learned a ton since open sourcing my first two themes [on Github](http://github.com/mmistakes), and wanted to try a few new things this time around.

If you've used any of [my other themes](http://mademistakes.com/work/jekyll-themes/) most of this should be familiar territory...

## What HPSTR brings to the table:
## HPSTR Features:

* Compatible with Jekyll 3 and GitHub Pages.
* Responsive templates for post, page, and post index `_layouts`. Looks great on mobile, tablet, and desktop devices.
* Gracefully degrads in older browsers. Compatible with Internet Explorer 8+ and all modern browsers.
* Modern and minimal design.
* Gracefully degrades in older browsers. Compatible with Internet Explorer 8+ and all modern browsers.
* Sweet animated menu.
* Background image support.
* Readable typography to make your words shine.
* Support for large images to call out your favorite posts.
* Built-in support for Sass courtesy of Jekyll 2.x.
* Optional [Disqus](http://disqus.com) comments.
* Simple and clear permalink structure[^1].
* [Open Graph](https://developers.facebook.com/docs/opengraph/) and [Twitter Cards](https://dev.twitter.com/docs/cards) support for a better social sharing experience.
* Simple [custom 404 page]({{ site.url }}/404.html) to get you started.
* Stylesheets for Pygments and Coderay [syntax highlighting]({{ site.url }}/code-highlighting-post/) to make your code examples look snazzy.
* [Custom 404 page]({{ site.url }}/404.html) to get you started.
* [Syntax highlighting]({{ site.url }}/code-highlighting-post/) stylesheets to make your code examples look snazzy.

<div markdown="0"><a href="{{ site.url }}/theme-setup/" class="btn btn-info">Theme Setup</a> <a href="https://github.com/mmistakes/hpstr-jekyll-theme" class="btn btn-success">Download HPSTR</a></div>

Expand Down
2 changes: 1 addition & 1 deletion assets/css/main.scss
Expand Up @@ -19,7 +19,7 @@ sitemap: false
@import "vendor/magnific-popup/magnific-popup";
@import "site";
@import "typography";
@import "pygments";
@import "syntax";
@import "coderay";
@import "gist";
@import "grid";
Expand Down
48 changes: 4 additions & 44 deletions theme-setup/index.md
Expand Up @@ -11,6 +11,8 @@ share: true

General notes and suggestions for customizing **HPSTR**.

HPSTR 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.

## Basic Setup for a new Jekyll site

1. [Install Bundler](http://bundler.io) `gem install bundler` and then install [Jekyll](http://jekyllrb.com) and all dependencies `bundle install`.
Expand All @@ -31,55 +33,13 @@ General notes and suggestions for customizing **HPSTR**.

1. Clone the following folders: `_includes`, `_layouts`, `_sass`, `assets`, and `images`.
2. Clone the following folders/files and personalize content as need: `about/`, `posts/`, `tags/`, `feed.xml` and `index.html`.
3. Set the following variables in your `config.yml` file:

{% highlight yaml %}
title: Site Title
description: Describe your website here.
disqus_shortname: shortname
# Your site's domain goes here (eg: //mmistakes.github.io, http://mademistakes.com, etc)
# When testing locally leave blank or use http://localhost:4000
url: //mmistakes.github.io

# Owner/author information
owner:
name: Your Name
avatar: avatar.jpg
bio: "Your bio goes here. It shouldn't be super long but a good two sentences or two should suffice."
email: you@email.com
# Social networking links used in footer. Update and remove as you like.
twitter:
facebook:
github:
stackexchange:
linkedin:
instagram:
flickr:
tumblr:
# google plus id, include the '+', eg +mmistakes
google_plus: +yourid

# Analytics and webmaster tools stuff goes here
google_analytics:
google_verify:
# https://ssl.bing.com/webmaster/configure/verify/ownership Option 2 content= goes here
bing_verify:

# http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
timezone: America/New_York
future: true
pygments: true
markdown: kramdown

# Amount of posts to show on home page
paginate: 5
{% endhighlight %}
3. Edit `_config.yml` to personalize your site.

---

## 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.
>
Expand Down

0 comments on commit 35ff7b4

Please sign in to comment.