Skip to content

The frontend, backend, and content source code for web.dev

License

Notifications You must be signed in to change notification settings

SHIBA-st-x/web.dev

This branch is 2118 commits behind GoogleChrome/web.dev:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

05314fd Β· Sep 10, 2021
Sep 4, 2021
Sep 2, 2021
Sep 2, 2021
Mar 22, 2021
Sep 10, 2021
Aug 18, 2021
Jul 23, 2021
Sep 3, 2021
Mar 29, 2021
Sep 3, 2021
Aug 10, 2021
Feb 10, 2021
Feb 8, 2021
Sep 2, 2021
Sep 7, 2021
Apr 30, 2019
Jun 3, 2021
Mar 5, 2021
Apr 29, 2020
Jun 8, 2020
Jun 28, 2021
Nov 1, 2019
Jun 2, 2021
Mar 5, 2021
Nov 1, 2019
Apr 16, 2021
Sep 13, 2018
Sep 2, 2021
May 27, 2021
Feb 8, 2021
Jul 22, 2021
May 20, 2021
Jul 9, 2021
May 21, 2020
Jun 8, 2020
Sep 10, 2021
Sep 10, 2021
Aug 30, 2021
Apr 20, 2021
Mar 22, 2021
Sep 4, 2021

Repository files navigation

web.dev

Continuous integration

web.dev is the ultimate resource for developers of all backgrounds to learn, create, and solve on the web. It's meant to not only educate developers, but help them apply what they've learned to any site they work on, be it personal or business.

Found a bug? πŸ‘·β€β™€οΈ

Thanks for letting us know! Please file an issue and a team member should reply shortly.

Authoring content ✍️

Before you start writing take a moment to look over the web.dev handbook and familiarize yourself with the process. When you're ready, follow the steps in the Quickstart to create your content proposal.

Building the site πŸ—

You'll need a recent version of Node: v14 (LTS) or higher. To check your node version run node -v in your terminal.

If you don't have node, or if you need to upgrade, we recommend using the Node Version Manager (nvm).

Clone the repo

git clone https://github.com/GoogleChrome/web.dev.git

Install dependencies

npm ci

Start a local server to preview the site

npm run dev

Open http://localhost:8080/ to see the site locally. Changes to assets will rebuild the site. Refresh to see your changes.

Set up build flags

Building the entire site can take a while because it's around one thousand pages. If you want to massively speed up your build times, we suggest setting some build flags to ignore certain sections.

  • Create a .env file at the root of your project
  • Add the following:
# Ignore ALL site content
ELEVENTY_IGNORE=true

# Only build the directories you're working on.
# Note, this is a JSON string so you must use double quotes.
ELEVENTY_INCLUDE=["blog", "vitals"]

Environments 🌳

Set ELEVENTY_ENV=prod to force production builds. This is the default when running "stage" or "deploy". No other options for ELEVENTY_ENV are supported, although our Eleventy site config will default to 'dev' if unspecified.

Staging πŸ•Ί

When you send in a pull request it will be automatically staged for you. Keep an eye out for the netlify bot to comment on the pull request with your unique URL.

Deploying the site πŸš€

Automatic deploys

The site will build and deploy the main branch automatically every hour, Mon-Fri. If you've just merged an article then it should go live at the top of the next hour.

Manual deploys

To manually deploy the site you'll need to be a member of one of these Google teams:

  • web.dev-eng
  • web.dev-owners
  1. Navigate to the Cloud Build Triggers page.
  2. Click the RUN button for the trigger named Deploy.
  3. In the side drawer that opens up, click the RUN TRIGGER button for the trigger for the main branch.

NOTE: web.dev auto deploys every hour if there is a new commit in the main branch. Manual deploys should only occur when a build fails or if auto deploys are disabled.

Debugging πŸ›

If you need to debug the site's build process:

  1. Add a debugger statement to .eleventy.js
  2. Run npm run debug:eleventy
  3. Go to about://inspect to attach to the running process.

The Chrome inspect page showing the inspect button

About

The frontend, backend, and content source code for web.dev

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 45.9%
  • Nunjucks 33.0%
  • SCSS 21.1%