-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Find a way to prevent broken book images #1391
Comments
Took a stab at this one in pull request #1392. A simple rake task that will parse each |
One problem with checking via rake task is that these are all run via Heroku's scheduler, which doesn't provide any mechanism for feedback (i.e., to tell us that some links are broken). After searching a bit, the usual proposed solution seems to be using the exception-notifier gem to send an email. But that implies configuring the site to send email, which is notoriously annoying. I wonder if we could instead have it open an issue in this repository. That would require setting up a bot GitHub account, but once done, it would be pretty reliable. Just downloading the images into the repo does side-step all of this, but it might be nice to get to the root of the problem. In particular:
|
I was addressing the case of a successful request with a non-image body and ran into some URLs returning a 301. We could follow the eventual location from the response header, but then there is the potential risk of infinite redirects. Adding all that logic seems a bit overkill for this solution, seeing as like @peff mentioned, this isn't a likely long term solution. It might make more sense here to punt and take the low-tech solution of downloading the images to the repo and updating the |
I think any kind of link-checking will have to handle redirects at some point. It would be OK to just put a hard limit on looping (say, 10). I do wonder if there's a higher-level gem than |
I would like to tackle this as my "good first issue" |
All cover images for Packt books are broken, as they lead to the images in (long expired) cache. For example, the cover image for "Mastering Git" book is now
instead of
|
added #1566 as a quick fix. but maybe we should just keep the images in the repo as we have with a few others (https://github.com/git/git-scm.com/tree/master/public/images/books) |
Thanks for jumping on this, @pedrorijo91. I'm not opposed to importing book images. They might get out of date with the source images, but if the publishers/authors care, they can open a PR. I'd rather have slightly old images than broken ones. But I'm also OK to punt on that to see if this actually happens again. It looks like our packt links were probably not the right ones in the first place here. |
|
As reported on #1390 , book images get broken from time to time.
I see 2 possible solutions:
The text was updated successfully, but these errors were encountered: