gjtorikian / html-proofer

Test your rendered HTML files to make sure they're accurate.
MIT License
1.57k stars 199 forks source link

Multiple values for directory_index_file #195

Closed maiertech closed 7 years ago

maiertech commented 9 years ago

I have a Jekyll website that generates links referring to a directory with different directory_index_files: index.html and index.xml (for Atom feeds). html-proofer throws an error for the feed URL since it expects index.html.

Using data-proofer-ignore to suppress checking the feed URL is not an option since the feed URL is generated by by a plugin: https://github.com/octopress/feeds.

Is there a way to define multiple directory index files or suppress checking other than adding this tag?

For information, this is the related ticket, which I opened with the plugin: https://github.com/octopress/feeds/issues/15

maiertech commented 9 years ago

@gjtorikian Do you have roadmap for this issue?

parkr commented 9 years ago

I noticed something similar to this today on my site:

- ./_site/go/index.html
  *  internally linking to /go/jekyll-build-server, which does not exist (line 50)
  *  internally linking to /go/merge-pr, which does not exist (line 58)
MrSaints commented 9 years ago

Any updates on this issue?

gjtorikian commented 9 years ago

I'll take a look!

gjtorikian commented 7 years ago

I looked into this a bit today and unfortunately it's just not possible to support multiple directory index files.

Since data-proofer-ignore is not an option, I suggest using url_ignore, which will exclude URLs known to be good:

HTMLProofer.check_directories(["out/"], {
  :url_ignore => [/index\.xml/],
}).run

I hope this helps.