You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-32
Original file line number
Diff line number
Diff line change
@@ -48,43 +48,24 @@ npm run dev
48
48
Open `http://localhost:8080/` to see the site locally. Changes to assets will
49
49
rebuild the site. Refresh to see your changes.
50
50
51
-
### Speeding up builds
51
+
### Set up build flags
52
52
53
-
⚠️ This is an experimental feature 🧪🔬
53
+
Building the entire site can take a while because it's around one thousand pages.
54
+
If you want to _massively_ speed up your build times, we suggest setting some
55
+
build flags to ignore certain sections.
54
56
55
-
Any change to the site will cause Eleventy to rebuild. This can take 10-20s. If
56
-
you want to speed things up you can isolate your directory using the `isolate`
57
-
command.
57
+
- Create a `.env` file at the root of your project
58
+
- Add the following:
58
59
59
-
```bash
60
-
npm run isolate
61
-
```
62
-
63
-
This will move all of the markdown files for the site into the `_exile`
64
-
directory and it will ignore them for builds.
65
-
66
-
You may pass an optional glob (or space separated list of globs) to the
67
-
`isolate` command to tell it to preserve a directory.
68
-
69
-
```bash
70
-
# Example 1: Preserve the style-focus directory
71
-
# note the -- which is needed to pass options to npm scripts
72
-
npm run isolate -- src/site/content/en/accessible/style-focus/**
60
+
```text
61
+
# Ignore ALL site content
62
+
ELEVENTY_IGNORE=true
73
63
74
-
# Example 2: Preserve everything in the accessible directory
75
-
npm run isolate -- src/site/content/en/accessible/**/*
64
+
# Only build the directories you're working on.
65
+
# Note, this is a JSON string so you must use double quotes.
66
+
ELEVENTY_INCLUDE=["blog", "vitals"]
76
67
```
77
68
78
-
When you're finished making your edits, run the `integrate` command to restore
79
-
all of the project files.
80
-
81
-
```bash
82
-
npm run integrate
83
-
```
84
-
85
-
☝️ A git commit hook will prevent you from being able to run `git commit` until
86
-
you have run the `integrate` command.
87
-
88
69
## Environments 🌳
89
70
90
71
Set `ELEVENTY_ENV=prod` to force production builds. This is the default when
@@ -116,7 +97,7 @@ teams:
116
97
-@GoogleChrome/web-devrel
117
98
118
99
1. Navigate to [the Deploy workflow in the Actions panel](https://github.com/GoogleChrome/web.dev/actions?query=workflow%3ADeploy).
119
-
2. Click the **Run workflow** button. Make sure the branch says `master`, then click the green **Run workflow** button.
100
+
2. Click the **Run workflow** button. Make sure the branch says `main`, then click the green **Run workflow** button.
120
101
121
102

0 commit comments