Skip to content

Commit 78c014c

Browse files
committed
Add travis and html and css checkers
1 parent 634bda7 commit 78c014c

File tree

4 files changed

+47
-0
lines changed

4 files changed

+47
-0
lines changed

.travis.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
language: ruby
2+
rvm:
3+
- 2.2
4+
5+
before_install:
6+
- nvm install node
7+
8+
install:
9+
- npm install -g csslint
10+
- bundle install
11+
12+
before_script:
13+
- chmod +x ./script/cibuild # or do this locally and commit
14+
15+
script:
16+
- ./script/cibuild
17+
- csslint _site/css/gallery.css
18+
- csslint _site/css/logo-nav.css
19+
- csslint _site/css/syntax.css
20+
- csslint _site/css/materialize.css
21+
22+
# branch whitelist, only for GitHub Pages
23+
branches:
24+
only:
25+
- master
26+
27+
env:
28+
global:
29+
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer

Gemfile

+6
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
11
source 'https://rubygems.org'
22
gem 'github-pages'
3+
gem "jekyll"
4+
gem "jekyll-redirect-from"
5+
gem "jekyll-paginate"
6+
gem "jekyll-sitemap"
7+
gem "jekyll-feed"
8+
gem "html-proofer"

README.md

+7
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,11 @@ Add commit (and don't forget to add to `_data/nav.yml`
7878

7979
`navbar_gray: true` start the navbar with a grey background if you need it.
8080

81+
# Continuous Integration Testing on Travis
82+
83+
Travis will run and test:
84+
85+
- jekyll build
86+
- html-proofer
87+
- csslint
8188

script/cibuild

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
set -e # halt script on error
3+
4+
bundle exec jekyll build
5+
bundle exec htmlproofer ./_site

0 commit comments

Comments
 (0)