Skip to content
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

fix: skip is-crawlable audit when running onSuccess against DEPLOY_URL #621

Conversation

aitchiss
Copy link
Contributor

@aitchiss aitchiss commented Oct 21, 2024

When we run onSuccess we use the DEPLOY_URL i.e. the permalink of the deploy. These deploys have x-robots-tag: noindex configured to stop bots from crawling deploy permalinks vs the main production site URL. This means we almost always receive a false positive for the lighthouse is-crawlable rule.

This PR skips that particular audit when running against the deploy url.

To test:

  • You could install the branch version of this plugin on a site and observe the difference in behaviour, but I did prepare an example 😄

  • This deploy is made with the latest fix - observe that the SEO report does not include any failure for allowing crawling

  • This deploy was made before the fix - notice that the SEO score is lower, and the crawling rule is highlighted in the report

@aitchiss aitchiss requested a review from a team as a code owner October 21, 2024 11:06
Copy link

netlify bot commented Oct 21, 2024

👷 Deploy Preview for plugin-lighthouse processing.

Name Link
🔨 Latest commit a218e36
🔍 Latest deploy log https://app.netlify.com/sites/plugin-lighthouse/deploys/671655af761bf90008e42357

@aitchiss aitchiss self-assigned this Oct 21, 2024
const settings = mergeSettingsSources(inputSettings);
if (Object.keys(settings).length === 0) return;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now we always pass back the default config, which is the same as if no config is passed to lighthouse at all

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😊

@aitchiss aitchiss merged commit 4be7b46 into main Oct 21, 2024
8 checks passed
@aitchiss aitchiss deleted the suzanne/wrfl-1813-lighthouse-plugin-skip-the-crawlers-audit-when-auditing branch October 21, 2024 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants