You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
Yeah, that's a tricky one. It sounds like during the link evaluation, it should check first to see if it's a file path (../) before expanding it, and then evaluate the ignore.
I don't have time at the moment to dig too deep into this, but I wonder if you could use --url-swap to temporarily "rewrite" these URLs? That is, something like --url-swap "../feed:../blog/feed". Also, correct me if I am wrong but wouldn't rewriting all the URLs also work? That is, rather than ../feed, to just make it all absolute paths: /blog/feed/rss.xml?
Also, correct me if I am wrong but wouldn't rewriting all the URLs also work? That is, rather than ../feed, to just make it all absolute paths: /blog/feed/rss.xml
Sure, but the web site generator I use uses relative links.
Anyway, my workaround is --url-ignore /feed/ which works fine, but I think html-proofer should expand file paths (as you suggest).
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 specifyrss.xml
as theDirectoryIndex
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?
The text was updated successfully, but these errors were encountered: