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

Increase base Lighthouse score of default Create Next App template #23887

Merged
merged 2 commits into from
Apr 12, 2021

Conversation

garmeeh
Copy link
Contributor

@garmeeh garmeeh commented Apr 11, 2021

Very small update to increase the base lighthouse score of the default template for Create Next App.

Before:
create-next-app-before

After:
create-next-app-after

To get a full 💯 sweep, <html> would need a lang attribute set. I think adding a custom document or i18n to the default template would probably be just a bit too much for such a simple template.

Documentation / Examples

  • Make sure the linting passes

@ijjk ijjk added the create-next-app Related to our CLI tool for quickly starting a new Next.js application. label Apr 11, 2021
@@ -57,7 +58,13 @@ export default function Home() {
rel="noopener noreferrer"
>
Powered by{' '}
<img src="/vercel.svg" alt="Vercel Logo" className={styles.logo} />
<img
Copy link
Member

Choose a reason for hiding this comment

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

This can use next/image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was thinking of adding next/image here but wasn't sure for the purpose of the default template did you want to include it? I can update to use if so.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah feel free to add it in a separate PR 👍

@timneutkens
Copy link
Member

How did you run these numbers? This change shouldn't have that type of effect, sounds like it was ran on a local machine 🤔

@garmeeh
Copy link
Contributor Author

garmeeh commented Apr 11, 2021

@timneutkens yeah these were just run locally that is why metrics are shifting. (sorry should have cut them out of the screenshot) Main figures effected by these changes are SEO and Accessibility.

Edit:

The numbers increased due to fixing two rules that were failing in the Lighthouse report.

  1. No meta description for SEO score
  2. Accessibility was for having a H3 after a H1 with no H2.

@timneutkens timneutkens merged commit 4f7f5f3 into vercel:canary Apr 12, 2021
@garmeeh garmeeh deleted the update-default-template branch April 14, 2021 19:45
kodiakhq bot pushed a commit that referenced this pull request Apr 15, 2021
Follow PR to #23887 to add next/image.

Only other change was wrapping the image in a span to allow for the margin that was previously on the actual `<img>`

## Documentation / Examples

- [x] Make sure the linting passes
SokratisVidros pushed a commit to SokratisVidros/next.js that referenced this pull request Apr 20, 2021
SokratisVidros pushed a commit to SokratisVidros/next.js that referenced this pull request Apr 20, 2021
Follow PR to vercel#23887 to add next/image.

Only other change was wrapping the image in a span to allow for the margin that was previously on the actual `<img>`

## Documentation / Examples

- [x] Make sure the linting passes
@vercel vercel locked as resolved and limited conversation to collaborators Jan 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
create-next-app Related to our CLI tool for quickly starting a new Next.js application.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants