diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..781c131 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,21 @@ +language: ruby +rvm: +- 2.3.1 + +before_script: + - chmod +x ./script/cibuild # or do this locally and commit + +# Assume bundler is being used, therefore +# the `install` step will run `bundle install` by default. +script: ./script/cibuild + +# branch whitelist +# branches: +# only: +# - feature/travis # test the travis branch + +env: + global: + - NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer + +sudo: false # route your build to the container-based infrastructure for a faster build \ No newline at end of file diff --git a/Gemfile b/Gemfile index 14a56de..73302fc 100644 --- a/Gemfile +++ b/Gemfile @@ -3,5 +3,6 @@ gem 'jekyll' gem 'jekyll-paginate' gem 'jekyll-autoprefixer' gem 'jekyll-serve' +gem 'html-proofer' gem 'classifier-reborn' gem 'jekyll-multiple-languages-plugin', :git => 'https://github.com/perrywoodin/jekyll-multiple-languages-plugin.git' \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index 38d2098..8e582bc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,15 +8,35 @@ GIT GEM remote: https://rubygems.org/ specs: + activesupport (4.2.7.1) + i18n (~> 0.7) + json (~> 1.7, >= 1.7.7) + minitest (~> 5.1) + thread_safe (~> 0.3, >= 0.3.4) + tzinfo (~> 1.1) + addressable (2.4.0) autoprefixer-rails (6.3.7) execjs classifier-reborn (2.0.4) fast-stemmer (~> 1.0) colorator (1.1.0) + colored (1.2) + ethon (0.9.0) + ffi (>= 1.3.0) execjs (2.7.0) fast-stemmer (1.0.2) ffi (1.9.14) forwardable-extended (2.6.0) + html-proofer (3.0.6) + activesupport (~> 4.2) + addressable (~> 2.3) + colored (~> 1.2) + mercenary (~> 0.3.2) + nokogiri (~> 1.5) + parallel (~> 1.3) + typhoeus (~> 0.7) + yell (~> 2.0) + i18n (0.7.0) jekyll (3.2.1) colorator (~> 1.0) jekyll-sass-converter (~> 1.0) @@ -35,26 +55,41 @@ GEM jekyll-serve (1.0.0.rc1) jekyll-watch (1.5.0) listen (~> 3.0, < 3.1) + json (1.8.3) kramdown (1.12.0) liquid (3.0.6) listen (3.0.8) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) mercenary (0.3.6) + mini_portile2 (2.1.0) + minitest (5.9.0) + nokogiri (1.6.8) + mini_portile2 (~> 2.1.0) + pkg-config (~> 1.1.7) + parallel (1.9.0) pathutil (0.14.0) forwardable-extended (~> 2.6) + pkg-config (1.1.7) rb-fsevent (0.9.7) rb-inotify (0.9.7) ffi (>= 0.5.0) rouge (1.11.1) safe_yaml (1.0.4) sass (3.4.22) + thread_safe (0.3.5) + typhoeus (0.8.0) + ethon (>= 0.8.0) + tzinfo (1.2.2) + thread_safe (~> 0.1) + yell (2.0.6) PLATFORMS ruby DEPENDENCIES classifier-reborn + html-proofer jekyll jekyll-autoprefixer jekyll-multiple-languages-plugin! @@ -62,4 +97,4 @@ DEPENDENCIES jekyll-serve BUNDLED WITH - 1.12.5 + 1.13.0 diff --git a/README.md b/README.md index afce7e4..e9394a9 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,17 @@ https://jekyllrb.com ### Supporting Gems Simply run `bundle install` and [bundler](http://bundler.io/) will install all ruby gems/dependencies. -Note: The Gems must also be installed on the CI server. + +CI Note: The Gems must also be installed on the CI server. + +Mac Note: Bundler will try to install the dependency `nokogiri`. If you are using a Mac, and run into issues related to `nokogiri` during `bundle install`, do the following: + +`xcode-select --install` + +`gem install nokogiri` + +Then run `bundle install` + ### Plugins * `jekyll-multiple-languages-plugin` installed as a gem. Documentation at https://github.com/perrywoodin/jekyll-multiple-languages-plugin. This is a modified fork that adds two new tags for outputting markdown `{% tmd key %}` or `{% translatemd key %}` @@ -26,6 +36,10 @@ Note: The Gems must also be installed on the CI server. ## Production Build Production builds should be handled by CI. +Mac +xcode-select --install +gem install nokogiri + ## i18n Language variables are set in `/_i18n/*.yml` files. The master language file is `/_i18n/en.yml`. All other languages should use that file as a base. diff --git a/_config.yml b/_config.yml index 7bd9692..39a9fe7 100644 --- a/_config.yml +++ b/_config.yml @@ -4,6 +4,9 @@ exclude: - rss.xml - _posts/README.md - assets/mockups/ + - vendor/ + - Gemfile + - Gemfile.lock paginate: 5 paginate_path: "/blog/page:num/" name: Dash diff --git a/script/cibuild b/script/cibuild new file mode 100644 index 0000000..7629548 --- /dev/null +++ b/script/cibuild @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +set -e # halt script on error + +bundle exec jekyll build +bundle exec htmlproofer ./_site --disable-external --allow-hash-href --assume-extension --empty-alt-ignore --file-ignore /assets/,/style-guide/,/blog/ \ No newline at end of file