Skip to content

Commit

Permalink
Merge pull bitcoin-dot-org#1193: Upgrade to Jekyll 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
harding committed Jan 16, 2016
2 parents 76a8abf + 7d98f79 commit 2b8c4c2
Show file tree
Hide file tree
Showing 62 changed files with 194 additions and 247 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ Thumbs.db
.bundle
vendor
_cache
.jekyll-metadata
8 changes: 4 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ group :development do
gem 'ffi-icu'
## When we upgrade to Jekyll 3.0.0 or higher, remove
## _plugin/remove-html-extension.rb
gem 'jekyll', '~>1.3.0'
gem 'jekyll', '~>3.0'
gem 'json'
gem 'less'
gem 'kramdown', '~>1.6.0'
gem 'less', '2.4.0'
gem 'kramdown'
gem 'RedCloth'
gem 'therubyracer' # required by less
gem 'jshintrb', '~>0.3.0'
Expand All @@ -29,5 +29,5 @@ end
## you can put whatever you want here and bundler will tell us humans to
## install the new Gems.
group :slow_test do
gem 'html-proofer'
gem 'html-proofer', '2.1.0'
end
89 changes: 38 additions & 51 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,16 @@ GEM
remote: https://rubygems.org/
specs:
RedCloth (4.2.9)
addressable (2.3.7)
classifier (1.3.3)
fast-stemmer (>= 1.0.0)
addressable (2.4.0)
colorator (0.1)
colored (1.2)
commander (4.1.5)
highline (~> 1.6.11)
commonjs (0.2.7)
ethon (0.7.3)
ethon (0.8.0)
ffi (>= 1.3.0)
execjs (2.6.0)
fast-stemmer (1.0.2)
ffi (1.9.3)
ffi-icu (0.1.2)
ffi (1.9.10)
ffi-icu (0.1.10)
ffi (~> 1.0, >= 1.0.9)
highline (1.6.20)
html-proofer (2.1.0)
addressable (~> 2.3)
colored (~> 1.2)
Expand All @@ -26,58 +20,51 @@ GEM
parallel (~> 1.3)
typhoeus (~> 0.7)
yell (~> 2.0)
jekyll (1.3.0)
classifier (~> 1.3)
jekyll (3.0.1)
colorator (~> 0.1)
commander (~> 4.1.3)
liquid (~> 2.5.2)
listen (~> 1.3)
maruku (~> 0.6.0)
pygments.rb (~> 0.5.0)
redcarpet (~> 2.3.0)
safe_yaml (~> 0.9.7)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 1.1)
kramdown (~> 1.3)
liquid (~> 3.0)
mercenary (~> 0.3.3)
rouge (~> 1.7)
safe_yaml (~> 1.0)
jekyll-sass-converter (1.4.0)
sass (~> 3.4)
jekyll-watch (1.3.0)
listen (~> 3.0)
jshintrb (0.3.0)
execjs
multi_json (>= 1.3)
rake
json (1.8.1)
kramdown (1.6.0)
json (1.8.3)
kramdown (1.9.0)
less (2.4.0)
commonjs (~> 0.2.7)
libv8 (3.16.14.3)
liquid (2.5.4)
listen (1.3.1)
libv8 (3.16.14.13)
liquid (3.0.6)
listen (3.0.5)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
rb-kqueue (>= 0.2)
maruku (0.6.1)
syntax (>= 1.0.0)
mercenary (0.3.5)
mini_portile (0.6.2)
mini_portile2 (2.0.0)
multi_json (1.11.2)
nokogiri (1.6.6.2)
mini_portile (~> 0.6.0)
parallel (1.4.1)
posix-spawn (0.3.6)
pygments.rb (0.5.4)
posix-spawn (~> 0.3.6)
yajl-ruby (~> 1.1.0)
nokogiri (1.6.7.1)
mini_portile2 (~> 2.0.0.rc2)
parallel (1.6.1)
rake (10.4.2)
rb-fsevent (0.9.3)
rb-inotify (0.9.2)
rb-fsevent (0.9.7)
rb-inotify (0.9.5)
ffi (>= 0.5.0)
rb-kqueue (0.2.0)
ffi (>= 0.5.0)
redcarpet (2.3.0)
ref (1.0.5)
safe_yaml (0.9.7)
syntax (1.0.0)
therubyracer (0.12.1)
ref (2.0.0)
rouge (1.10.1)
safe_yaml (1.0.4)
sass (3.4.20)
therubyracer (0.12.2)
libv8 (~> 3.16.14.0)
ref
typhoeus (0.7.1)
ethon (>= 0.7.1)
yajl-ruby (1.1.0)
typhoeus (0.8.0)
ethon (>= 0.8.0)
yell (2.0.5)

PLATFORMS
Expand All @@ -86,10 +73,10 @@ PLATFORMS
DEPENDENCIES
RedCloth
ffi-icu
html-proofer
jekyll (~> 1.3.0)
html-proofer (= 2.1.0)
jekyll (~> 3.0)
jshintrb (~> 0.3.0)
json
kramdown (~> 1.6.0)
less
kramdown
less (= 2.4.0)
therubyracer
22 changes: 11 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,34 @@ JEKYLL_LOG=._jekyll.log
#######################

## `make` (no arguments): just build
default: build
default: clean build

## `make preview`: start the built-in Jekyll preview
preview:
preview: clean
$S bundle exec jekyll serve

## `make test`: don't build, but do run all tests
test: pre-build-tests post-build-tests

## `make valid`: build and run fast tests
valid: pre-build-tests-fast build post-build-tests-fast
valid: clean pre-build-tests-fast build post-build-tests-fast

## `make all`: build and run all tests
all: pre-build-tests build post-build-tests
all: clean pre-build-tests build post-build-tests

## `make deployment`: for use on build server
deployment: install-deps-deployment \
deployment: clean install-deps-deployment \
valid

## `make travis`: for use with Travis CI
travis: travis-background-keepalive \
travis: clean travis-background-keepalive \
install-deps-development \
all





## Install dependencies (development version)
install-deps-development:
bundle install
Expand Down Expand Up @@ -95,6 +96,9 @@ manual-checks: manual-check-diff-sha256sums
#################
ERROR_ON_OUTPUT="sed '1s/^/ERROR:\n/' | if grep . ; then sed 1iERROR ; false ; else true ; fi"

clean:
$S bundle exec jekyll clean

## Always build using the default locale so log messages can be grepped.
## This should not affect webpage output.
build:
Expand All @@ -107,13 +111,9 @@ build:

## Jekyll annoyingly returns success even when it emits errors and
## exceptions, so we'll grep its output for error strings
#
## FIXME: temporarily ignoring errors from WEBrick because
## _plugin/remove-html-extension does something hackish until we upgrade
## to Jekyll 3.0.0
check-for-build-errors:
$S egrep -i '(error|warn|exception)' $(JEKYLL_LOG) \
| grep -vi webrick.*filehandler \
| grep -vi 'rouge/lexers/shell.rb' \
| eval $(ERROR_ON_OUTPUT)


Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,8 @@ coordination is usually conducted in #bitcoin-dev on Freenode.
active: true
## Banner displayed if 'active: true'. Can use HTML formatting
banner: "<b>Chain fork</b> - Please stop mining on bitcoin version 0.8.0. Click here for more information."
## Date of the alert in YYYY-MM-DD format
date: 2015-03-11
---
{% comment %}
Expand Down
1 change: 1 addition & 0 deletions _alerts/2012-02-18-protocol-change.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
shorturl: "feb20"
active: false
banner: ""
date: 2012-02-18
---
<p>
In June 2010 the Bitcoin reference software version 0.2.10 introduced
Expand Down
1 change: 1 addition & 0 deletions _alerts/2012-03-16-critical-vulnerability.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
shorturl: "critfix"
active: false
banner: ""
date: 2012-03-16
---
<p>
A potential security vulnerability has been discovered in the Windows
Expand Down
1 change: 1 addition & 0 deletions _alerts/2012-05-14-dos.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
shorturl: "dos"
active: false
banner: ""
date: 2012-05-14
---
<h2 id="risks">Risks</h2>
<p>
Expand Down
1 change: 1 addition & 0 deletions _alerts/2013-03-11-chain-fork.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
shorturl: "chainfork"
active: false
banner: ""
date: 2013-03-11
---
<h2 id="what-happened">What happened</h2>
<p>
Expand Down
1 change: 1 addition & 0 deletions _alerts/2013-03-15-upgrade-deadline.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
shorturl: "may15"
active: false
banner: ""
date: 2013-03-15
---
<h2 id="what-is-happening">What is happening</h2>
<p>
Expand Down
1 change: 1 addition & 0 deletions _alerts/2013-08-11-android.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
active: false
shorturl: "android"
banner: ""
date: 2013-08-11
---

<h2 id="what-happened">What happened</h2>
Expand Down
1 change: 1 addition & 0 deletions _alerts/2014-02-11-malleability.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: "Transaction malleability"
active: false
banner: ""
date: 2014-02-11
---

<h2 id="what-happened">What happened</h2>
Expand Down
1 change: 1 addition & 0 deletions _alerts/2014-04-11-heartbleed.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
shorturl: "heartbleed"
active: false
banner: ""
date: 2014-04-11
---

<h2 id="what-happened">What happened</h2>
Expand Down
1 change: 1 addition & 0 deletions _alerts/2015-07-04-spv-mining.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
title: "Some Miners Generating Invalid Blocks"
shorturl: "spv-mining"
active: false
date: 2015-07-04
#banner: "WARNING: many wallets currently vulnerable to double-spending of confirmed transactions (click here to read)"
bannerclass: "alert"
---
Expand Down
49 changes: 45 additions & 4 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ baseurl: /

source: .
destination: ./_site
plugins: ./_plugins
plugins_dir: ./_plugins
exclude:
- Gemfile
- Gemfile.lock
Expand All @@ -185,10 +185,9 @@ exclude:

future: true
lsi: false
highlighter: rouge
pygments: true
markdown: kramdown
permalink: date
excerpt_separator: "<!-- END_EXCERPT -->"

rdiscount:
extensions: []
Expand All @@ -198,7 +197,15 @@ kramdown:
footnote_nr: 1
entity_output: as_char
toc_levels: 2..6
use_coderay: false
enable_coderay: false
syntax_highlighter: rouge
syntax_highlighter_opts:
## With the 'text' option, no highlighting is applied by default. We
## need this for backwards compatibility with existing code blocks.
default_lang: text

## Might be useful in the future, but turn off for upgrade to Jekyll 3.0
css_class:

coderay:
coderay_wrap: div
Expand Down Expand Up @@ -505,3 +512,37 @@ devsearches:
- "tx": "/en/developer-reference#tx"
- "verack": "/en/developer-reference#verack"
- "version": "/en/developer-reference#version"

collections:
## _alerts
alerts:
output: true
permalink: /en/alert/:path
## _releases
releases:
output: true
permalink: /en/release/:path

defaults:
- scope:
path: ""
type: alerts
values:
layout: alert
lang: en
- scope:
path: ""
type: releases
values:
layout: release
lang: en
breadcrumbs:
- bitcoin
- bcc
- bcc news
- RELEASE
- scope:
path: ""
type: posts
values:
lang: en
2 changes: 1 addition & 1 deletion _layouts/alert.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# http://opensource.org/licenses/MIT.

layout: base
lang: en
## Note: global variables like page.lang must be set in _config.yml for collections
---
{% if page.canonical != nil %}
<script>window.location.href='{{ page.canonical }}';</script>
Expand Down
Loading

0 comments on commit 2b8c4c2

Please sign in to comment.