rmitc/rmitc.org — pull request #19 by nhanb (2014-04-07 11:25:45+00:00)
Title: Add link checker in build script

Sample build [here](https://travis-ci.org/rmitc/rmitc.org/builds/22435523).

This addresses #16, here's what it does:

- Look for all http/https links in `_posts/*.mkd`
- Run all those links through `curl`. If response code is neither **2xx** nor **3xx**, print an ERROR message
- When all links have been processed, exit with code `1` (== fails) if there's at least 1 error case.

One problem is that there are links that take forever to load (even though we use `curl -I`, which only fetches the response headers, not body). I made a compromise by setting curl timeout to 5s, which sometimes gives false positives (http://www.action.vn for example).

And for some unknown reason, some completely legitimate links return a 4xx (see the sample build output).

Any thoughts? @tklarryonline @tmtxt