kinnetica/jekyll-plugins — pull request #8 by JangoSteve (2013-01-31 04:55:10+00:00)
Title: Added ability to exclude sub-pages, like thank_you/index.html.

The current implementation of `EXCLUDE_FILES` doesn't allow excluding pages that are within subdirectories, because it only compares the array constant with `page.name`.

For example, I like having pretty URLs, so instead of `some_page.html`, I have `some_page/index.html`. That means for all my pages:

```
page.name #=> "index.html"
```

So, I can either put "index.html" in `EXCLUDE_FILES` and it will exclude every page from the sitemap, or don't put that and it will include all of them.

I added a `page.file_path` method and pass that into the `excluded?` method instead of the page name. It returns the relative path of the file without the leading slash. So, it's identical to `path.name` for files in the root directory, but includes the directory name otherwise.