Comments (15)
After adding the missing file the issue is gone. But it is just a workaround. The question is, why Proofer tries to proof an non-existent file?
from html-proofer.
It's more a feature then a bug. Basically, like every browser ever, Proofer expects there to be a top-level index.html file when you navigate to a folder. For pages with clean URLs (or just using Jekyll), checking for an index.html is really handy.
The workaround suggested was to add data-proofer-ignore
to the anchor. I could in the future add an option to disable assumption of index.html but I have not seen it as a problem yet.
from html-proofer.
Basically, like every browser ever, Proofer expects there to be a top-level index.html file when you navigate to a folder.
If the link is to a folder, then it can be any number of things (index.html
, index.htm
, index.shtml
, index.php
, index.xml
, etc) depending upon the server setup. You're not assuming there's going to be an index.html file for every folder level, right? Just for those directories being linked to?
from html-proofer.
shifty eyes
html-proofer/lib/html/proofer/checkable.rb
Line 108 in 4904bf8
You're not assuming there's going to be an index.html file for every folder level, right? Just for those directories being linked to?
Yes. But now your mention of all those other file types has me in a tizzy. 😩
from html-proofer.
Yes. But now your mention of all those other file types has me in a tizzy.
I think HTMLProofer can assume either html
, htm
, or xhtml
. But honestly... should this be a tool for legacy sites? 😉
shifty eyes
If @check.src
is a dir, then I think it's safe to assume you should check for a common index file. Maybe that can be a config option?
from html-proofer.
@gjtorikian The error occurs while you load the source files with outgoing links before you start to check anything: https://github.com/gjtorikian/html-proofer/blob/master/lib/html/proofer.rb#L25 Nevermind.
from html-proofer.
Yeah, I just ran into this one as well https://travis-ci.org/nschonni/wet-boew/builds/32812844#L2463
Slight difference was that there is no link to a folder root, but just rally long query string plus anchor link (I think that is what is tripping it, but there is no trace back)
from html-proofer.
@nschonni Can you please provide the exact link?
This is your situation now, right?
# does not exist
dist/demos/texthighlight/index.html
# do exist
dist/demos/texthighlight/texthighlight-fr.html
dist/demos/texthighlight/texthighlight-en.html
from html-proofer.
@penibelst I believe the link it's having trouble with is ?txthl=avian%20influenza+world+cook+flu-like%20symptoms+Don't%20Forget...+causes%20sickness%20in%20birds,%20it%20can%20also%20infect%20people.#example
from here https://github.com/wet-boew/wet-boew-dist/blob/4b3ea7429223726c674350737cd879bc31992c3e/demos/texthighlight/texthighlight-en.html#L136
You can grab the prebuilt site if you want to test it out https://github.com/wet-boew/wet-boew-dist
Oddly enough, if I add :followlocation => false
and :disable_external => true
then it runs, although then other missing trailing slashes are found, but it no longer crashes.
from html-proofer.
I think #93 fixes all the mentioned issues.
from html-proofer.
@nschonni The version 1.3.0 fixes your issue.
from html-proofer.
Thanks @penibelst! It's not crashing anymore, but it just stalls out completely https://travis-ci.org/nschonni/wet-boew/builds/33367787
I'll see if I can find a combo of options that lets it run again.
from html-proofer.
@nschonni Can you please start Proofer with only one file?
HTML::Proofer.new("example.html").run
from html-proofer.
Yeah, running a smaller set help, but it's taking almost 10minutes to run on less than 200 pages now. Getting false positives for the href links, not sure if it's tripping on HTML5 elements, but this is the wrong thread for that 😉
from html-proofer.
@nschonni External URLs are unpredictable. Try the timeout
option:
HTML::Proofer.new(dir, {
:timeout => 10 # seconds
}).run
If you see false positives, please open a new issue with examples.
from html-proofer.
Related Issues (20)
- Reporting broken links when using relative internal links reported as broken HOT 11
- Fails multi email mailto
- Add --ignore-internal flag HOT 4
- Error for http only sites HOT 5
- allow_missing_href started giving false positives since v4.3 HOT 2
- cyn.eth
- HTTP 302 (to the same URL?) reported as failures HOT 2
- Error during deployment with scheme format HOT 3
- Question - setting up html proofer to skip new pages added to a website which will return a 404 HOT 3
- "ERROR: Invalid predicate" on ugly Maven search URL HOT 2
- Manager
- Small extra hint for beginners HOT 2
- Ruby 3.3.0 parameters bug HOT 3
- CI output disappeared when running htmlproofer, only raw logs show errors HOT 1
- The regex in Attribute::URL.clean_url is very slow for JavaScript bookmarklet URLs HOT 2
- Allow color in non tty shell HOT 7
- Link checker triggered on <a name="..."> and <a id="..."> HOT 6
- Want documentation (or even feature?) to parallelize local scans HOT 1
- Configuration by file? HOT 1
- Hash checker expects # in `id` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from html-proofer.