Fixes, fixes.
This commit is contained in:
parent
e2de7ab0c7
commit
bd4a8c1ce2
|
@ -79,7 +79,7 @@ module Jekyll
|
||||||
end
|
end
|
||||||
listener.start
|
listener.start
|
||||||
|
|
||||||
Jekyll.logger.info "Auto-regeneration:", "enabled for '#{source}'"
|
Jekyll.logger.info "Auto-regeneration:", "enabled for '#{options['source']}'"
|
||||||
|
|
||||||
unless options['serving']
|
unless options['serving']
|
||||||
trap("INT") do
|
trap("INT") do
|
||||||
|
|
|
@ -14,7 +14,7 @@ private repositories.
|
||||||
[0]: https://travis-ci.org/
|
[0]: https://travis-ci.org/
|
||||||
[1]: https://github.com/
|
[1]: https://github.com/
|
||||||
|
|
||||||
## Enabling Travis and GitHub
|
## 1. Enabling Travis and GitHub
|
||||||
|
|
||||||
Enabling Travis builds for your GitHub repository is pretty simple:
|
Enabling Travis builds for your GitHub repository is pretty simple:
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ Enabling Travis builds for your GitHub repository is pretty simple:
|
||||||
configuration happens in you `.travis.yml` file. More details on that
|
configuration happens in you `.travis.yml` file. More details on that
|
||||||
below.
|
below.
|
||||||
|
|
||||||
## The Test Script
|
## 2. The Test Script
|
||||||
|
|
||||||
The simplest test script simply runs `jekyll build` and ensures that Jekyll
|
The simplest test script simply runs `jekyll build` and ensures that Jekyll
|
||||||
doesn't fail to build the site. It doesn't check the resulting site, but it
|
doesn't fail to build the site. It doesn't check the resulting site, but it
|
||||||
|
@ -36,29 +36,29 @@ This tool checks your resulting site to ensure all links and images exist.
|
||||||
Utilize it either with the convenient `html-proof` command-line executable,
|
Utilize it either with the convenient `html-proof` command-line executable,
|
||||||
or write a Ruby script which utilizes the gem.
|
or write a Ruby script which utilizes the gem.
|
||||||
|
|
||||||
### The `html-proof` Executable
|
### The HTML Proofer Executable
|
||||||
|
|
||||||
```bash
|
{% highlight bash %}
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
jekyll build
|
jekyll build
|
||||||
html-proof ./_site
|
html-proof ./_site
|
||||||
```
|
{% endhighlight %}
|
||||||
|
|
||||||
Some options can be specified via command-line switches. Check out the
|
Some options can be specified via command-line switches. Check out the
|
||||||
`html-proofer` README for more information about these switches, or run
|
`html-proofer` README for more information about these switches, or run
|
||||||
`html-proof --help` locally.
|
`html-proof --help` locally.
|
||||||
|
|
||||||
### The `html/proofer` Library
|
### The HTML Proofer Library
|
||||||
|
|
||||||
You can also invoke `html-proofer` in Ruby scripts (e.g. in a Rakefile):
|
You can also invoke `html-proofer` in Ruby scripts (e.g. in a Rakefile):
|
||||||
|
|
||||||
```ruby
|
{% highlight ruby %}
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
|
|
||||||
require 'html/proofer'
|
require 'html/proofer'
|
||||||
HTML::Proofer.new("./_site").run
|
HTML::Proofer.new("./_site").run
|
||||||
```
|
{% endhighlight %}
|
||||||
|
|
||||||
Options are given as a second argument to `.new`, and are encoded in a
|
Options are given as a second argument to `.new`, and are encoded in a
|
||||||
symbol-keyed Ruby Hash. More information about the configuration options,
|
symbol-keyed Ruby Hash. More information about the configuration options,
|
||||||
|
@ -66,14 +66,14 @@ check out `html-proofer`'s README file.
|
||||||
|
|
||||||
[2]: https://github.com/gjtorikian/html-proofer
|
[2]: https://github.com/gjtorikian/html-proofer
|
||||||
|
|
||||||
## Configuring Your Travis Builds
|
## 3. Configuring Your Travis Builds
|
||||||
|
|
||||||
This file is used to configure your Travis builds. Because Jekyll is built
|
This file is used to configure your Travis builds. Because Jekyll is built
|
||||||
with Ruby and requires RubyGems to install, we use the Ruby language build
|
with Ruby and requires RubyGems to install, we use the Ruby language build
|
||||||
environment. Below is a sample `.travis.yml` file, and what follows that is
|
environment. Below is a sample `.travis.yml` file, and what follows that is
|
||||||
an explanation of each line.
|
an explanation of each line.
|
||||||
|
|
||||||
```yaml
|
{% highlight yaml %}
|
||||||
language: ruby
|
language: ruby
|
||||||
rvm:
|
rvm:
|
||||||
- 2.1
|
- 2.1
|
||||||
|
@ -88,7 +88,7 @@ branches:
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer
|
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer
|
||||||
```
|
{% endhighlight %}
|
||||||
|
|
||||||
Ok, now for an explanation of each line:
|
Ok, now for an explanation of each line:
|
||||||
|
|
||||||
|
@ -155,7 +155,7 @@ which it must compile each time it is installed. Luckily, you can
|
||||||
dramatically increase the install time of Nokogiri by setting the
|
dramatically increase the install time of Nokogiri by setting the
|
||||||
environment variable `NOKOGIRI_USE_SYSTEM_LIBRARIES` to `true`.
|
environment variable `NOKOGIRI_USE_SYSTEM_LIBRARIES` to `true`.
|
||||||
|
|
||||||
## Gotchas
|
## 4. Gotchas
|
||||||
|
|
||||||
### Exclude `vendor`
|
### Exclude `vendor`
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue