This benchmark requires a Contentful space and will source its data from there while running the benchmark.
Queries the title, body and a cover image from Contentful. Creates pages for that and displays those three things as "Articles". Those individual article pages and the homepage share a common "Layout" component (in src/components) that can be swapped (layout_1.js and layout_2.js) to simulate a code change in multiple pages.
- Setup will-it-build data source
- Copy
.env.exampleto.env.developmentand make sure all variables are set - Run
yarn setup
Note that the script is idempotent, so you can re-run it on failures.
Also use yarn setup --skip [N:number] to skip first N articles
(for example articles created during a previous run which failed)
Sometimes Contentful silently fails to process images which causes builds to fail. Use following approach to fix those:
- Run
yarn site find-broken-images - Change image URLs in will-it-build dataset for this site to some other images
(or just use one of the larger sites and set
BENCHMARK_SITE_IDappropriately) - Run
yarn site fix-broken-images imageid1 imageid2 imageid3This command updates broken images with images from theBENCHMARK_SITE_IDdataset
- Copy
.env.exampleto.env.production - Set
BENCHMARK_CONTENTFUL_SPACE_IDandBENCHMARK_CONTENTFUL_ACCESS_TOKENvariables - Run
yarn build
- Copy
.env.exampleto.env.production - Set
BENCHMARK_CONTENTFUL_SPACE_IDandBENCHMARK_CONTENTFUL_MANAGEMENT_TOKENvariables - Run
yarn data-update