Helpers for prettier links by relying on auto-index

Add a route and context helper to make it easier to have "pretty" links.

For example, `route $ indexRoute converter` makes:

`posts/foo/bar/2015-01-01-some_post.md`

Route to:

`posts/foo/bar/some_post/index.html`

(assuming `converter` strips the date prefix and markdown extension)

Then, `indexedUrlField "url"` makes:

`$url$`

Show:

`/posts/foo/bar/some_post/`

In your template.

So long as auto-index is enabled on your server, visiting this URL will render the generated index.html.

Edit: updated usage based on @nagisa 's feedback.
Please see the commit message. It's a URL, not a filepath so we actually
don't want `\` on windows.
On Dec 7, 2014 1:39 PM, "Alexey Kreschuk" <notifications@github.com> wrote:

> In src/Hakyll/Web/Template/Context.hs:
>
> > @@ -182,6 +184,20 @@ urlField key = field key $
> >
> >
> >  --------------------------------------------------------------------------------
> > +-- | Absolute url to the resulting item with a trailing @index.html@ removed if
> > +-- present
> > +indexedUrlField :: String -> Context a
> > +indexedUrlField = mapContext stripIndex . urlField
> > +
> > +  where
> > +    stripIndex :: String -> String
> > +    stripIndex url =
> > +        case splitFileName url of
> > +            (path, "index.html") -> dropWhileEnd (== '/') path
>
> Why not just System.FilePath.dropTrailingPathSeparator?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/jaspervdj/hakyll/pull/315/files#r21426810>.
>