Skip to content

--url-ignore doesn't consider full file path #593

Description

@tbm

I'm not 100% sure this is a bug, but I think so.

I generate /blog/feed/rss.xml but my pages link to /blog/feed and I specify rss.xml as the DirectoryIndex in Apache, so just /blog/feed/ works.

Obviously html-proofer doesn't know about the redirect, so I added --url-ignore /blog/feed/ (not sure if there's a better solution?).

This works for pages which have a ../blog/feed/ link, but for pages under /blog/, they have ../feed/ links - they don't mention /blog/ since they are relative links, but obviously the link is to /blog/feed/.

So I think that html-proofer should always consider the full path of a link when checking against --url-ignore. So e.g. a ../feed/ link in /blog/foo/index.html should be converted to /blog/feed/ before evaluating --url-ignore.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions