diff --git a/Gemfile b/Gemfile index c7edecf7..b92f100e 100644 --- a/Gemfile +++ b/Gemfile @@ -32,3 +32,7 @@ if ENV['BENCHMARK'] gem 'rbtrace' gem 'stackprof' end + +if ENV['PROOF'] + gem 'html-proofer', '~> 2.0' +end diff --git a/circle.yml b/circle.yml new file mode 100644 index 00000000..ff2a40b4 --- /dev/null +++ b/circle.yml @@ -0,0 +1,9 @@ +machine: + timezone: UTC + ruby: + version: 2.1.5 + environment: + PROOF: true +test: + override: + - script/proof -f diff --git a/script/proof b/script/proof index e5bc24b2..47126fc1 100755 --- a/script/proof +++ b/script/proof @@ -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 diff --git a/site/_docs/configuration.md b/site/_docs/configuration.md index ac05a989..827d99bd 100644 --- a/site/_docs/configuration.md +++ b/site/_docs/configuration.md @@ -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 diff --git a/site/_docs/deployment-methods.md b/site/_docs/deployment-methods.md index 04dda9f2..d9dd7ea2 100644 --- a/site/_docs/deployment-methods.md +++ b/site/_docs/deployment-methods.md @@ -91,7 +91,7 @@ Another way to deploy your Jekyll site is to use [Rake](https://github.com/jimwe ### rsync -Once you’ve 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). You’d obviously need to change the values to reflect your site’s details. There is even [a matching TextMate command](http://gist.github.com/214959) that will help you run +Once you’ve 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). You’d obviously need to change the values to reflect your site’s details. There is even [a matching TextMate command](http://gist.github.com/214959) that will help you run this script from within Textmate. diff --git a/site/_docs/plugins.md b/site/_docs/plugins.md index 84f4196e..7d13aac4 100644 --- a/site/_docs/plugins.md +++ b/site/_docs/plugins.md @@ -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. diff --git a/site/_docs/posts.md b/site/_docs/posts.md index 36b9fe1b..0b0e8773 100644 --- a/site/_docs/posts.md +++ b/site/_docs/posts.md @@ -43,7 +43,7 @@ file. For example, the following are examples of valid post filenames:
- Use the post_url
+ Use the post_url
tag to link to other posts without having to worry about the URL's
breaking when the site permalink style changes.