Merge pull request #3427 from jekyll/proof

This commit is contained in:
Parker Moore 2015-02-07 23:48:55 -08:00
commit 20bfdbb794
10 changed files with 53 additions and 31 deletions

View File

@ -32,3 +32,7 @@ if ENV['BENCHMARK']
gem 'rbtrace'
gem 'stackprof'
end
if ENV['PROOF']
gem 'html-proofer', '~> 2.0'
end

9
circle.yml Normal file
View File

@ -0,0 +1,9 @@
machine:
timezone: UTC
ruby:
version: 2.1.5
environment:
PROOF: true
test:
override:
- script/proof -f

View File

@ -5,20 +5,29 @@
set -e
if [[ "$1" != "-f" ]]; then
git diff --name-only ..master | grep '^site/' || {
echo "No site files changed. We'll skip proofing. Run with -f to force."
exit 0
}
fi
echo "Some site files have been changed! Proofing..."
command -v htmlproof || {
echo "Installing HTML::Proofer!"
gem install html-proofer -- --use-system-libraries
function msg {
printf "\e[0;37m==> $1\e[0m\n"
}
bundle exec jekyll build -s site -d _site --trace
printf "\e[0;36mProofing begins now!\e[0m\n"
htmlproof ./_site
INGORE_HREFS=$(ruby -e 'puts %w{
Chrononaut
twitter.com
nearlyfreespeech.net
}.map{|h| "/#{h}/"}.join(",")')
SOURCE="site"
DESTINATION="_site"
export PROOF=true
export NOKOGIRI_USE_SYSTEM_LIBRARIES=true
# 1.
msg "Installing..."
bundle install -j8 > /dev/null || bundle install > /dev/null
# 2.
msg "Building..."
bundle exec jekyll build -s $SOURCE -d $DESTINATION --full-rebuild --trace
# 3.
msg "Proofing..."
time bundle exec htmlproof ./$DESTINATION --href-ignore $INGORE_HREFS

View File

@ -410,7 +410,7 @@ defaults:
layout: "default"
{% endhighlight %}
In this example the `layout` is set to `default` inside the [collection](../collections) with the name `my_collection`.
In this example the `layout` is set to `default` inside the [collection](../collections/) with the name `my_collection`.
### Precedence

View File

@ -91,7 +91,7 @@ Another way to deploy your Jekyll site is to use [Rake](https://github.com/jimwe
### rsync
Once youve generated the `_site` directory, you can easily rsync it using a `tasks/deploy` shell script similar to [this deploy script here](https://github.com/henrik/henrik.nyh.se/blob/master/tasks/deploy). Youd obviously need to change the values to reflect your sites details. There is even [a matching TextMate command](http://gist.github.com/214959) that will help you run
Once youve generated the `_site` directory, you can easily rsync it using a `tasks/deploy` shell script similar to [this deploy script here](https://github.com/henrik/henrik.nyh.se/blob/master/script/deploy). Youd obviously need to change the values to reflect your sites details. There is even [a matching TextMate command](http://gist.github.com/214959) that will help you run
this script from within Textmate.

View File

@ -53,10 +53,10 @@ You have 3 options for installing plugins:
In general, plugins you make will fall into one of four categories:
1. [Generators](#Generators)
2. [Converters](#Converters)
3. [Commands](#Commands)
4. [Tags](#Tags)
1. [Generators](#generators)
2. [Converters](#converters)
3. [Commands](#commands)
4. [Tags](#tags)
## Generators
@ -273,7 +273,7 @@ class MyNewCommand < Jekyll::Command
c.syntax "new [options]"
c.description 'Create a new Jekyll site.'
c.option 'dest', '-d DEST, 'Where the site should go.'
c.option 'dest', '-d DEST', 'Where the site should go.'
c.action do |args, options|
Jekyll::Site.new_site_at(options['dest'])
@ -560,7 +560,7 @@ You can find a few useful plugins at the following locations:
- [Jekyll-citation](https://github.com/archome/jekyll-citation): Render BibTeX-formatted bibliographies/citations included in posts and pages (pure Ruby).
- [Jekyll Dribbble Set Tag](https://github.com/ericdfields/Jekyll-Dribbble-Set-Tag): Builds Dribbble image galleries from any user.
- [Debbugs](https://gist.github.com/2218470): Allows posting links to Debian BTS easily.
- [Refheap_tag](https://github.com/aburdette/refheap_tag): Liquid tag that allows embedding pastes from [refheap](https://refheap.com).
- [Refheap_tag](https://github.com/aburdette/refheap_tag): Liquid tag that allows embedding pastes from [refheap](https://www.refheap.com/).
- [Jekyll-devonly_tag](https://gist.github.com/2403522): A block tag for including markup only during development.
- [JekyllGalleryTag](https://github.com/redwallhp/JekyllGalleryTag) by [redwallhp](https://github.com/redwallhp): Generates thumbnails from a directory of images and displays them in a grid.
- [Youku and Tudou Embed](https://gist.github.com/Yexiaoxing/5891929): Liquid plugin for embedding Youku and Tudou videos.
@ -579,13 +579,13 @@ You can find a few useful plugins at the following locations:
- [Jekyll Github Sample Tag](https://github.com/bwillis/jekyll-github-sample): A liquid tag to include a sample of a github repo file in your Jekyll site.
- [Jekyll Project Version Tag](https://github.com/rob-murray/jekyll-version-plugin): A Liquid tag plugin that renders a version identifier for your Jekyll site sourced from the git repository containing your code.
- [Piwigo Gallery](https://github.com/AlessandroLorenzi/piwigo_gallery) by [Alessandro Lorenzi](http://www.alorenzi.eu/): Jekyll plugin to generate thumbnails from a Piwigo gallery and display them with a Liquid tag
- [mathml.rb](https://github.com/tmthrgd/jekyll-plugins) by [Tom Thorogood](http://tomthorogood.co.uk/): A plugin to convert TeX mathematics into MathML for display.
- [mathml.rb](https://github.com/tmthrgd/jekyll-plugins) by Tom Thorogood: A plugin to convert TeX mathematics into MathML for display.
- [webmention_io.rb](https://github.com/aarongustafson/jekyll-webmention_io) by [Aaron Gustafson](http://aaron-gustafson.com/): A plugin to enable [webmention](http://indiewebcamp.com/webmention) integration using [Webmention.io](http://webmention.io). Includes an optional JavaScript for updating webmentions automatically between publishes and, if available, in realtime using WebSockets.
- [Jekyll 500px Embed](https://github.com/lkorth/jekyll-500px-embed) by [Luke Korth](https://lukekorth.com/). A Liquid tag plugin that embeds [500px](https://500px.com/) photos.
- [Jekyll 500px Embed](https://github.com/lkorth/jekyll-500px-embed) by Luke Korth. A Liquid tag plugin that embeds [500px](https://500px.com/) photos.
- [inline\_highlight](https://github.com/bdesham/inline_highlight): A tag for inline syntax highlighting.
- [jekyll-mermaid](https://github.com/jasonbellamy/jekyll-mermaid): Simplify the creation of mermaid diagrams and flowcharts in your posts and pages.
- [twa](https://github.com/Ezmyrelda/twa): Twemoji Awesome plugin for Jekyll. Liquid tag allowing you to use twitter emoji in your jekyll pages.
-
-
#### Collections
- [Jekyll Plugins by Recursive Design](http://recursive-design.com/projects/jekyll-plugins/): Plugins to generate Project pages from GitHub readmes, a Category page, and a Sitemap generator.
@ -594,7 +594,7 @@ You can find a few useful plugins at the following locations:
#### Other
- [ditaa-ditaa](https://github.com/tmthrgd/ditaa-ditaa) by [Tom Thorogood](http://tomthorogood.co.uk/): a drastic revision of jekyll-ditaa that renders diagrams drawn using ASCII art into PNG images.
- [ditaa-ditaa](https://github.com/tmthrgd/ditaa-ditaa) by Tom Thorogood: a drastic revision of jekyll-ditaa that renders diagrams drawn using ASCII art into PNG images.
- [Pygments Cache Path by Raimonds Simanovskis](https://github.com/rsim/blog.rayapps.com/blob/master/_plugins/pygments_cache_patch.rb): Plugin to cache syntax-highlighted code from Pygments.
- [Draft/Publish Plugin by Michael Ivey](https://gist.github.com/49630): Save posts as drafts.
- [Growl Notification Generator by Tate Johnson](https://gist.github.com/490101): Send Jekyll notifications to Growl.

View File

@ -43,7 +43,7 @@ file. For example, the following are examples of valid post filenames:
<div class="note">
<h5>ProTip™: Link to other posts</h5>
<p>
Use the <a href="../templates#post-url"><code>post_url</code></a>
Use the <a href="../templates/#post-url"><code>post_url</code></a>
tag to link to other posts without having to worry about the URL's
breaking when the site permalink style changes.
</p>

View File

@ -31,7 +31,7 @@ On Red Hat, CentOS, and Fedora systems you can do this by running:
sudo yum install ruby-devel
{% endhighlight %}
On [NearlyFreeSpeech](http://nearlyfreespeech.net/) you need to run the
On [NearlyFreeSpeech](https://www.nearlyfreespeech.net/) you need to run the
following commands before installing Jekyll:
{% highlight bash %}

View File

@ -28,4 +28,4 @@ Happy developing!
[changelog]: /docs/history/
[@jglovier]: https://github.com/jglovier
[jekyll-1]: /news/2013/05/06/jekyll-1-0-0-released/
[jekyll-1]: {% post_url 2013-05-06-jekyll-1-0-0-released %}

View File

@ -16,4 +16,4 @@ Jekyll 2.2.0 contains a few key updates:
will now work properly).
As always, a full list of the updates are on the
[history page](/docs/history#v2-2-0). Happy Jekylling!
[history page](/docs/history/#v2-2-0). Happy Jekylling!