docs
docs copied to clipboard
Add Lazy Loading for Homepage Images and Check script
Fixes #5981
Proposed Changes
- added lazy load in homepage images
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: shivamgupta2020 Once this PR has been reviewed and has the lgtm label, please assign dsimansk for approval. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
Deploy Preview for knative ready!
Built without sensitive environment variables
| Name | Link |
|---|---|
| Latest commit | 34b7d52bc9de7edb86dc16482a260403e145b337 |
| Latest deploy log | https://app.netlify.com/sites/knative/deploys/6668bf5c7f3a05000946eb2f |
| Deploy Preview | https://deploy-preview-5998--knative.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
@shivamgupta2020
The check script should do these:
- Build the website
- Parse HTML pages that are built
- Check for
imgtags withoutlazy - Report the locations (file, line number) of the tags w/o
lazyattribute in the script logs (stdout) - Fail (by exiting with a code that's not zero)
This script should be running in a Github action.
I would recommend this approach:
- Write that script (can be a Python script)
- Include it in the PR, with documentation and dependencies (
requirements.txtthat can be used bypip) - Get feedback, make sure it works
- Then create a GitHub action that runs the script
Thanks, @aliok , for the suggestions. Iām currently working on the script part and will include all your suggestions in a new commit as soon as possible.
@shivamgupta2020
The check script should do these:
- Build the website
- Parse HTML pages that are built
- Check for
imgtags withoutlazy- Report the locations (file, line number) of the tags w/o
lazyattribute in the script logs (stdout)- Fail (by exiting with a code that's not zero)
This script should be running in a Github action.
I would recommend this approach:
- Write that script (can be a Python script)
- Include it in the PR, with documentation and dependencies (
requirements.txtthat can be used bypip)- Get feedback, make sure it works
- Then create a GitHub action that runs the script
Should the script also run for v1.13, v1.12, and the development folder present in the "site" folder?
I've created the workflow file as @aliok suggested. Currently, most of the images on the website are not lazy-loaded, resulting in many errors. Could you please check the script output on your local machine to verify it's working as expected? Also, please review the workflow code to ensure it's implemented correctly. Thank you!
PR needs rebase.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
This Pull Request is stale because it has been open for 90 days with
no activity. It will automatically close after 30 more days of
inactivity. Reopen with /reopen. Mark as fresh by adding the
comment /remove-lifecycle stale.