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(gatsby-source-contentful): Calculate fixed image width if only height supplied #24393

Closed
wants to merge 237 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
237 commits
Select commit Hold shift + click to select a range
1da5b37
Calculate fixed image width if necessary
mrseanbaines May 23, 2020
6f407a7
Merge branch 'master' of github.com:gatsbyjs/gatsby into fix-gatsby-s…
mrseanbaines Jun 10, 2020
b554bd5
fix(gatsby): Add null context check (#24904)
ascorbic Jun 10, 2020
ad47c24
fix(www): sidebar scrolling shouldn't move main content (#24438)
alexpyzhianov Jun 10, 2020
09224dc
change yarn to gatsby command (#24364)
muescha Jun 10, 2020
c8228f5
Add Sourcing from Flotiq documentation entry (#24721)
andrzejwp Jun 10, 2020
5d980e3
Warning in docs before bumping master branch (#24538)
Ildarik Jun 10, 2020
e908448
Add Deploy to Gatsby Cloud subsection to main tutorial (#24576)
Jun 10, 2020
a0cd2b9
fix language, add title (#24579)
muescha Jun 10, 2020
6eafab3
chore(docs): Standardize word website (#24728)
jbampton Jun 10, 2020
99da774
feat(recipes): add gitlab-ci-cd recipe to cli list (#24501)
puzzledbytheweb Jun 10, 2020
9b2a804
feat(recipes): add github pages deployement with travis (#23669)
Slashgear Jun 10, 2020
aa9aa96
fix link, remove local links, code block for example url (#24649)
muescha Jun 10, 2020
130d5b7
chore(docs): mention async/await syntax in Gatsby Node APIs docs (#24…
visualfanatic Jun 10, 2020
c31ef6f
chore(gatsby): Fix all Netlify app links for subdomains. Change .com…
jbampton Jun 10, 2020
f0cb87b
Update index.md (#24657)
jsjoeio Jun 10, 2020
7f38822
Docs - Lighthouse audits (#24783)
shanejones Jun 10, 2020
3858990
remove local domain, brand names, typos (#24824)
muescha Jun 10, 2020
d2f5099
remove local domain, brand name, escape \$ (#24803)
muescha Jun 10, 2020
d95033c
fix brand names, files in code blocks (#24800)
muescha Jun 10, 2020
773f8cc
fix(docs): next.js github links (zeit to vercel) (#24785)
iamdarshshah Jun 10, 2020
f14c99b
fix: links zeit to vercel (#24786)
iamdarshshah Jun 10, 2020
17ca485
chore(docs): 🔒 Fix missing HTTPS on github.io links (#24918)
jbampton Jun 11, 2020
e61a342
chore(docs): Fix Netlify app links change .com to .app. (#24921)
jbampton Jun 11, 2020
a42cae7
chore(starters): Updated starter URLs due to DNS changes and Github R…
Gunnerforlife Jun 11, 2020
f9c1092
feat(benchmarks): add Kontent benchmark (#24605)
Simply007 Jun 11, 2020
7afdfce
Add blog post about commitment to equity and how we are going to do i…
mgienow Jun 11, 2020
8f41d62
Blog Post : "Presenting without sharing my slides" by Sam Larsen-Disn…
slarsendisney Jun 12, 2020
ee6787e
Removed unneccesary "an" (#24937)
capndave Jun 12, 2020
0257654
docs: update Stripe ecommerce tutorial (#24882)
idl3 Jun 12, 2020
03ef386
chore(docs): 🔒 Fix missing HTTPS on surge.sh, wordpress.com and react…
jbampton Jun 12, 2020
1a0a7fb
docs: gatsby-plugin-offline mentions Workbox (#24942)
dandv Jun 12, 2020
39e5874
Adjust frontmatter because errors (#24957)
mgienow Jun 12, 2020
13b7cba
refactor(www): convert EcosystemBoard to function component + cleanup
abhishekjakhar Jun 14, 2020
f18a627
refactor(www): convert sticky-responsive-sidebar to function component
abhishekjakhar Jun 14, 2020
9e1562f
refactor(www): convert the class based collapsible to function component
abhishekjakhar Jun 14, 2020
a32798a
chore: update www (#24869)
renovate[bot] Jun 14, 2020
b80d743
Remove gatsby-admin dependency from gatsby by packaging it into gatsb…
mxstbr Jun 15, 2020
88d5eeb
chore(release): Publish
mxstbr Jun 15, 2020
8311cbd
fix(blog): Gatsby Slides - local domain, brand names, code blocks ...…
muescha Jun 15, 2020
c7e1274
refactor(www): convert <Banner/> component to theme-ui + cleanup (#24…
abhishekjakhar Jun 16, 2020
a32e57d
refactor(www): cleanup of MarkdownPageFooter + convert to function co…
abhishekjakhar Jun 16, 2020
85e3a19
removed unused componentWillUnmount lifecycle method (#24960)
abhishekjakhar Jun 16, 2020
2f07764
chore(www): convert the overview component to theme-ui (#24929)
abhishekjakhar Jun 16, 2020
64bfbfb
refactor(www): convert avatar of guidelines to theme-ui (#24847)
abhishekjakhar Jun 16, 2020
0bd565a
imported Box & Flex from theme-ui + fix the flexBasis css rule (#24836)
abhishekjakhar Jun 16, 2020
d5866b4
refactor(www): convert EvaluationTable to function component (#24835)
abhishekjakhar Jun 16, 2020
661d3f3
refactor(www): convert SimpleEvaluationTable to function component (#…
abhishekjakhar Jun 16, 2020
792c3f0
docs: add forgotten paren to client-only routes (#24990)
dandv Jun 16, 2020
1697bf4
fix(blog): you belong here - remove local domain (#24976)
muescha Jun 16, 2020
68ca7da
fix(gatsby-admin): add missing `nodemon` dependency (#25014)
mxstbr Jun 16, 2020
1bb8818
docs(gatsby): Update path to slug (#25002)
tuxsisir Jun 16, 2020
3c9797d
fix(docs): glossary/markdown - change bash to shell (#24984)
muescha Jun 16, 2020
08dc0f7
docs(gatsby): remove unnecessary abbr tags (#24964)
Jun 16, 2020
beca716
docs(gatsby): update api-files.md to clarify plugins can implement th…
shannonbux Jun 16, 2020
21c396d
fix(recipe): GitHub Pages - brand names (#24982)
muescha Jun 16, 2020
b6ae337
Update index.md with missing word (#24956)
mgienow Jun 16, 2020
8d5664f
Start develop proxy before actual develop process (#25015)
mxstbr Jun 16, 2020
2270c5a
feat(gatsby): allow serving of dotfiles from public folder (#24958)
ligaz Jun 16, 2020
c9a24f9
fix(gatsby-source-filesystem): Update typings for createRemoteFileNod…
vladar Jun 16, 2020
17caf99
fix: update starters and examples (#24871)
renovate[bot] Jun 16, 2020
04e6635
chore(gatsby): Add typings for action arrays and thunks (#24720)
ascorbic Jun 16, 2020
3f3ec35
chore: update outdated puppeteer versions (#23949)
ElijahCano33 Jun 16, 2020
f4fe564
update lock file
sidharthachatterjee Jun 16, 2020
4fd6abe
update documentation for PageProps type definition (#24927)
jhackshaw Jun 16, 2020
6c99659
chore(gatsby): convert inference-metadata to typescript (#24381)
Kornil Jun 16, 2020
a6ef610
chore(gatsby): Migrate utils/page-data to TypeScript (#23991)
hiwelo Jun 16, 2020
670f92f
chore(gatsby): convert schema-customization to typescript (#24259)
Kornil Jun 16, 2020
ff67e9e
chore(docs): Update adding-a-list-of-markdown-blog-posts (#25034)
jbuget Jun 17, 2020
6a9ffcc
chore(gatsby): cleanup sift remnants from run-sift.js (#25042)
pvdz Jun 17, 2020
e3e8da4
chore(gatsby): cleanup some sift remnants from tests (#25046)
pvdz Jun 17, 2020
3c7c34a
fix(gatsby-starter-blog): Move typescript usage to other file (#25044)
LekoArts Jun 17, 2020
a0ab7b1
refactor(gatsby): convert program reducer to typescript (#24941)
tgallacher Jun 17, 2020
67f8266
chore(gatsby): remove mentions of sift and refactor (#25049)
pvdz Jun 17, 2020
25e04c6
chore(gatsby): Re-export reporter types from gatsby-cli (#25045)
ascorbic Jun 17, 2020
96dbf2b
chore(gatsby): remove `sift` as a Gatsby depency (#25061)
pvdz Jun 17, 2020
b32c8d3
chore(gatsby-cli): delete *.d.ts files before creating new ones (#25065)
pieh Jun 17, 2020
be27140
chore(gatsby): migrate run-sift to TS (#25055)
pvdz Jun 17, 2020
95ef4cf
chore(CODEOWNERS): define rule for /benchmarks/ (#25071)
pieh Jun 17, 2020
777ab65
maintenance(www): Explicitly type GraphQL fields (#24943)
tesseralis Jun 17, 2020
fac20ae
chore(showcase): Add bold.org into showcase (#25079)
oorestisime Jun 18, 2020
b2bf298
feat(gatsby): Instrument partial writes to page data (#24808)
sidharthachatterjee Jun 18, 2020
d556fe3
maintenance(www): add environment variables to disable sourcing from …
tesseralis Jun 18, 2020
0407cc6
perf(gatsby): Lazily re-create GraphQL runner (#25063)
ascorbic Jun 18, 2020
4d70f1a
fix(gatsby-core-utils): fix hash for buffers (#24614)
wardpeet Jun 18, 2020
c884b0d
chore(docs): Update documentation for createNodeField (#24740)
freiksenet Jun 18, 2020
13aaa16
fix(gatsby-plugin-offline): versioned import of idb-keyval (#24938)
nibtime Jun 18, 2020
d427663
fix(sw): use NetworkFirst strategy for page-data (#24940)
nibtime Jun 18, 2020
8e6e021
fix(gatsby): allow amending autoprefixer options (#24907)
lxsymington Jun 18, 2020
f68cdb7
Add Gatsby CLI Survey second round results (#25096)
mgienow Jun 18, 2020
281c425
chore(eslint-config): change eslint to better match strict ruleset (#…
herecydev Jun 18, 2020
39d4cec
feat(gatsby-source-drupal): Add skipFileDownloads config option (#25029)
smthomas Jun 18, 2020
f88d9d8
manually bump starters to solve problem (#25107)
Jun 18, 2020
a9e0290
feat(gatsby-source-shopify): Add handle field to blog + article queri…
staffordrose Jun 18, 2020
6c8ca0a
fix linting in blog post (#25114)
tesseralis Jun 19, 2020
bfbe02a
upgrade dependencies (#25117)
kmelve Jun 19, 2020
a78c7b0
refactor(gatsby): change bootstrap to use services (#24816)
ascorbic Jun 19, 2020
b95439c
chore(release): Publish
ascorbic Jun 19, 2020
4c0916b
fix: Several Fixes for Scroll Handling and Restoration (#24306)
blainekasten Jun 19, 2020
ba0597b
chore(release): Publish
blainekasten Jun 19, 2020
7fd4806
add theme ui as dependency to solve npm bug (#25122)
Jun 19, 2020
b955504
chore(gatsby): Clean up repo from accidental commit of gatsby-reporte…
blainekasten Jun 19, 2020
cf1f272
docs: configure nginx and Apache for client-only routes (#24997)
dandv Jun 19, 2020
6d05a5e
Update index.md (#24995)
dA505819 Jun 19, 2020
cc3d4f4
docs: fix warning (use emoji) (#25018)
lffg Jun 19, 2020
37fc2da
Documentation: fs solution is found in multiple GitHub issues and sho…
Jun 19, 2020
e0ad421
docs: improve English in Debugging the build process (#25035)
dandv Jun 19, 2020
eba033e
fix(bin): point bin to always existing files (#25121)
pieh Jun 19, 2020
dacbbae
chore(showcase): Add suganthan.com (#24784)
shanejones Jun 19, 2020
6367a7d
feat(docs): page on migrating remark -> mdx (#23832)
lannonbr Jun 19, 2020
0089342
Update Kontent benchmark to use latest reporting plugin (#25134)
duffn Jun 19, 2020
96bfbeb
Add honeycombcreative.com to Site Showcase (#24912)
conorbarclay Jun 19, 2020
3f2fbe1
Add annie as creator and add two projects. (#24924)
AnnieTaylorCHEN Jun 19, 2020
5e845c3
Update twin.macro installation instructions (#24666)
ben-rogerson Jun 19, 2020
ce5e387
Adding Plausible Analytics plugin (#24777)
metmarkosaric Jun 19, 2020
bed5dc4
fix(gatsby): remove page-date from jest-worker (#25135)
wardpeet Jun 19, 2020
592801b
fix(gatsby-remark-embed-snippet): readme - add example sources (#24874)
muescha Jun 20, 2020
be86318
fix: remove old component cruft (#25139)
Jun 20, 2020
5d79089
chore: update yarn
wardpeet Jun 20, 2020
17a3988
chore(release): Publish
wardpeet Jun 20, 2020
400d01f
docs: mention pageContext serialization affect on Dates (#25039)
dandv Jun 20, 2020
d708fa2
Update schema-customization.md (#25109)
jzabala Jun 20, 2020
38bba5c
fix(docs): adding-analytics - fix brand name: Plausible Analytics -> …
muescha Jun 22, 2020
d2ba6c0
fix(docs): debugging-the-build-process -> brand name Node -> Node.js…
muescha Jun 22, 2020
528fc75
fix(showcase): fix brand name TailwindCSS to Tailwind CSS (#25176)
muescha Jun 22, 2020
bdd4c6d
chore(docs): update help wanted label link (#25163)
rzgry Jun 22, 2020
d7d79f4
chore(docs): Fix a typo in docs/gatsby-on-linux.md (#25160)
dragoneena12 Jun 22, 2020
e07dc5c
chore: add typescript formatting to prettier (#25175)
rodrigograca31 Jun 22, 2020
c59d12e
fix(using-i18n): Add slash to make absolute path, not relative (#25180)
LekoArts Jun 22, 2020
d2278aa
chore(showcase): Add tim-phillips.com to showcase (#24654)
timphillips Jun 22, 2020
0c59bac
chore(starters): Add my-minimal-blog-starter (#24558)
imjamesku Jun 22, 2020
3489ce4
chore(showcase): Showcase updates & removals (#24631)
lannonbr Jun 22, 2020
d72c902
chore(showcase): update broken link (#24632)
parkersarsfield Jun 22, 2020
445e315
fix(gatsby): show error message instead of [Object object] (#25182)
wardpeet Jun 22, 2020
7140cc1
chore(starters): add gatsby-starter-jest-enzyme-eslint (#24307)
markbello Jun 22, 2020
c2a14b9
chore(showcase): Add sandalboyz.com to showcase (#24622)
ryansandalboyz Jun 22, 2020
538fd93
chore(starters): Add tailwind starter (#24624)
kosvrouvas Jun 22, 2020
3900aae
chore(gatsby-plugin-benchmark-reporting): dont emit flush error witho…
pvdz Jun 22, 2020
88c3a22
refactor: run page queries together with static queries and run requi…
pieh Jun 22, 2020
3934c37
fix(gatsby): convert module.exports to es6 in redux/filters (#25191)
pvdz Jun 22, 2020
e4ddb50
Blog: Announcing partner program (#25173)
mgienow Jun 22, 2020
e288131
fix(gatsby-dev-cli): chmod new bin files (#25194)
pieh Jun 22, 2020
38eed44
refactor(websocket): unify page-data emitting (#25190)
pieh Jun 22, 2020
dd369a5
Fix linting
sidharthachatterjee Jun 22, 2020
d69cd16
fix(blog): Mail link in partner program (#25198)
LekoArts Jun 22, 2020
94d1c49
chore(gatsby): move cache folders to .cache (#25192)
wardpeet Jun 22, 2020
50854fb
chore(release): Publish
wardpeet Jun 22, 2020
1364453
chore(gatsby): convert loadNodeContent to async and cache it (#25195)
pvdz Jun 22, 2020
6b6b2f2
fix(docs): change bash to shell in code language blocks (#22899)
muescha Jun 22, 2020
5f1e240
refactor(gatsby): Change develop command to use startWebpackServer se…
ascorbic Jun 22, 2020
934e516
chore(release): Publish
ascorbic Jun 22, 2020
69e1f69
fix(www): fix APILink to source pointing to wrong location (#25132)
rzgry Jun 22, 2020
0564d82
[WIP] chore(www): add tabindex attr to Img components in home-logo-ba…
Jun 22, 2020
40724e8
fix(gatsby-react-router-scroll): replace querySelector with getElemen…
hartshorne Jun 22, 2020
2f3bce4
fix(doc): Tailwind-CSS: add code fences (#25201)
muescha Jun 23, 2020
b8962c2
fix(docs): troubleshooting-common-errors -> brand name, highlight lin…
muescha Jun 23, 2020
a72caa6
fix(gatsby): Typo in the code example of the PageProps inline docs (#…
ehrencrona Jun 23, 2020
c63c2e9
chore(gatsby): Convert db/nodes to TS (#25199)
pvdz Jun 23, 2020
74932de
fix: update www (#25197)
renovate[bot] Jun 23, 2020
d842f8c
chore(gatsby): drop `nodeStore` concept (#25225)
pvdz Jun 23, 2020
35fa9e9
fix(gatsby-cli) add missing @types/common-tags (#25228)
Gosha Jun 23, 2020
8ffad5c
chore(release): Publish
blainekasten Jun 23, 2020
530772d
chore(rfcs): Update documentation on RFC for its location in gatsbyjs…
blainekasten Jun 23, 2020
432c4f7
fix(gatsby): Fix SSL for develop (#25230)
mxstbr Jun 23, 2020
47ba542
Blog gatsby days reconfigured (#25231)
mgienow Jun 23, 2020
657dce5
add gatsby-starter-pod6 (#24563)
zag Jun 23, 2020
3f49262
Update sites.yml (#24391)
przemyslaw-przylucki Jun 23, 2020
3ad4c52
Showcase vimtraining.com (#24477)
nishantdania Jun 23, 2020
f366abb
chore(showcase): Add codewithlinda.com (#24528)
Linda-Ikechukwu Jun 23, 2020
5e6824a
chore(showcase): Add clarkeharris.com and add danielhusar.sk (#24593)
danielhusar Jun 23, 2020
f75e82d
chore(showcase): add Impuls-e website to showcase (#24889)
jbastosufsc Jun 23, 2020
c2763de
chore(showcase): add DUDOS web design agency (#24895)
markhext Jun 23, 2020
7fd5485
new site (#24983)
hudat Jun 23, 2020
3a79e9d
chore(showcase): Add digital4better.com to showcase (#25050)
stefancosquer Jun 23, 2020
43c3556
add starter gatsby-starter-paper-css-landing-page (#25053)
manzanillo Jun 23, 2020
9666df3
update submissions to site showcase (#24839)
janosh Jun 23, 2020
0907801
chore(showcase): Add amvi.org.mx (#24757)
jakeherp Jun 23, 2020
74c7976
fix: update starters and examples (#25196)
renovate[bot] Jun 23, 2020
1e95954
chore(showcase): add Nyxo.app (#24776)
turq84 Jun 23, 2020
fe04c7f
chore: update packages (#24868)
renovate[bot] Jun 23, 2020
1c99d34
fix(gatsby-plugin-sharp): use contentdigest for base64 cache (#24892)
wardpeet Jun 23, 2020
0189bf7
chore(showcase): Add Jamstack Storefront and Suport Black Business (#…
PHironaka Jun 23, 2020
98100d6
chore(showcase): add diogorodrigues.dev (#25012)
Jun 23, 2020
a40fd01
chore(showcase): add dailytexascountry.com (#25099)
bradgarropy Jun 23, 2020
7319ba8
chore(showcase): Add Dovetail + Afterpay Story to showcase (#25111)
fab Jun 23, 2020
9269d6a
Adding `Hippocampus's Garden` to the showcase (#25167)
shionhonda Jun 23, 2020
2cd7e9b
add reqview.com to sites.yml (#25221)
tomnovacek Jun 23, 2020
bca9674
Update starters.yml (#25124)
weensy Jun 23, 2020
0f08741
fix(blog): Broken link in "Partner Program" article, use `Pullquote` …
mgienow Jun 24, 2020
9debfa7
Correct Ward Peeters name misspell 😞 (#25241)
mgienow Jun 24, 2020
0005a1f
chore(release): Publish
LekoArts Jun 24, 2020
0308074
chore(starters): add headless (#24623)
RantumBits Jun 24, 2020
a2eeeab
chore(starters): add gatsby-starter-tailwind-opinionated (#24413)
mjsarfatti Jun 24, 2020
301e668
chore(docs): fix typo in docs/convincing-others.md (#25245)
hazohelet Jun 24, 2020
debe18e
docs: fix typo postCssPlugins in tailwind-css docs (#25235)
muescha Jun 24, 2020
2b68c84
feat(gatsby-remark-embed-snippet): Add the ability to embed named sni…
BobWall23 Jun 24, 2020
30f21f6
chore(blog): Bring back links in `Pullquote citation` (#25251)
fk Jun 24, 2020
38ea5a4
chore(blog): YouTube videos via `gatsby-remark-embedder` (#25253)
fk Jun 24, 2020
aaf7cb5
Revert "chore(blog): Bring back links in `Pullquote citation`" (#25256)
fk Jun 24, 2020
b5299e9
chore(docs): remark-parse has renamed their main branch (#25254)
ehrencrona Jun 24, 2020
34b0d5a
chore(gatsby-recipies): graphql-tools subpackages (#24917)
yaacovCR Jun 24, 2020
630f687
Add Kat Huang blog author and avatar (#25261)
Jun 24, 2020
abdbab4
Create minimal starter (#24578)
Jun 24, 2020
8365a6d
Add Makenna Smutz external speaker video (#25263)
mgienow Jun 24, 2020
9b3faa2
maintenance(docs): Add retext-spell to check spelling (#24372)
tesseralis Jun 24, 2020
1407770
Blog gatsby days reconfigured video 2 (#25265)
mgienow Jun 24, 2020
b63e322
Add video presentation Colby Fayock Gatsby Days Reconfigured (#25267)
mgienow Jun 24, 2020
9f1394e
Update static-vs-normal-queries.md (#25255)
midopooler Jun 24, 2020
cd7bbd3
Add Sam Julien Gatsby Days REconfigured video 4 (#25269)
mgienow Jun 24, 2020
0d23e7e
Fix spelling errors and add more nouns to the dictionary (#25270)
tesseralis Jun 24, 2020
df8f181
Add missing definition (#25284)
tesseralis Jun 25, 2020
839a60e
fix(www): give name to anonymous exported function (#25164)
abhishekjakhar Jun 25, 2020
7fdb23e
remove styled flex component from guidelines system components (#25154)
abhishekjakhar Jun 25, 2020
ff83475
chore(www): convert ImagePlaceholder used in guidelines to theme-ui (…
abhishekjakhar Jun 25, 2020
d9ad8e5
Fix a prettier formatting issue in blog post (#25285)
tesseralis Jun 25, 2020
2b45c0e
Add usage instructions for images
Jun 25, 2020
9903506
Blog gatsby WebAIM Million (#25273)
mgienow Jun 25, 2020
898461f
Adjust language slightly (#25299)
Jun 25, 2020
d41526f
Change official plugins testing condition (#25300)
Jun 25, 2020
e59b4a9
feat(docs): Add explanation of Site.siteMetadata field (#25208)
TylerBarnes Jun 25, 2020
b75ffc3
chore(showcase): Add erp.laputan.com.au (#25227)
kakchan Jun 26, 2020
35744ac
chore(docs): Correct capitalization for Sass (#25311)
jina Jun 26, 2020
1cf0c27
chore(test): Test on Node 14 (#23354)
MichaelDeBoey Jun 26, 2020
32c186f
update author.yaml for Marcy Sutton (#25306)
Jun 26, 2020
b73cc5d
refactor(develop): expose APIs to suspend/resume webpack watching to …
pieh Jun 26, 2020
67b3ca9
maintenance(www): use gatsby-plugin-react-svg for icons (#25282)
tesseralis Jun 27, 2020
49c0929
fix(gatsby-plugin-mdx): set childOf extension for Mdx type definition…
tesseralis Jun 27, 2020
48f7878
fix(gatsby-transformer-documentationjs): Add childOf, mimeTypes and f…
tesseralis Jun 27, 2020
6013206
chore(www): convert BoxWithBorder to theme-ui (#25144)
abhishekjakhar Jun 27, 2020
7b0de96
chore(www): Tidy `sx` prop `space` usage (#25333)
fk Jun 27, 2020
219e01e
chore(starters): add gatsby-starter-capacitor (#24755)
Jun 27, 2020
9e68ac3
Remove fake styled components from banner (#25352)
tesseralis Jun 27, 2020
aa8c300
refactor(www): Convert Pullquote to use theme-ui (#25351)
tesseralis Jun 27, 2020
c1368c0
chore(www): Refactor `homepage-logo-banner` (#25348)
fk Jun 27, 2020
c9c3d68
chore(www): Refactor `ecosystem-section` (#25349)
fk Jun 27, 2020
8b50135
Calculate fixed image width if necessary
mrseanbaines May 23, 2020
653281a
Merge branch 'fix-gatsby-source-contentful-srcSet' of github.com:gats…
mrseanbaines Jun 29, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,34 @@ Object {
}
`;

exports[`contentful extend node type resolveFixed generates responsive resolution data for images using height option 1`] = `
Object {
"aspectRatio": 1,
"baseUrl": "//images.contentful.com/ubriaw6jfhm1/10TkaLheGeQG6qQGqWYqUI/5421d3108cbb699561acabd594fa2cb0/ryugj83mqwa1asojwtwb.jpg",
"height": 400,
"src": "//images.contentful.com/ubriaw6jfhm1/10TkaLheGeQG6qQGqWYqUI/5421d3108cbb699561acabd594fa2cb0/ryugj83mqwa1asojwtwb.jpg?w=400&h=400&fit=fill",
"srcSet": "//images.contentful.com/ubriaw6jfhm1/10TkaLheGeQG6qQGqWYqUI/5421d3108cbb699561acabd594fa2cb0/ryugj83mqwa1asojwtwb.jpg?w=400&h=400&fit=fill 1x,
//images.contentful.com/ubriaw6jfhm1/10TkaLheGeQG6qQGqWYqUI/5421d3108cbb699561acabd594fa2cb0/ryugj83mqwa1asojwtwb.jpg?w=600&h=600&fit=fill 1.5x,
//images.contentful.com/ubriaw6jfhm1/10TkaLheGeQG6qQGqWYqUI/5421d3108cbb699561acabd594fa2cb0/ryugj83mqwa1asojwtwb.jpg?w=800&h=800&fit=fill 2x,
//images.contentful.com/ubriaw6jfhm1/10TkaLheGeQG6qQGqWYqUI/5421d3108cbb699561acabd594fa2cb0/ryugj83mqwa1asojwtwb.jpg?w=1200&h=1200&fit=fill 3x",
"width": 400,
}
`;

exports[`contentful extend node type resolveFixed generates responsive resolution data for images using width option 1`] = `
Object {
"aspectRatio": 0.75,
"baseUrl": "//images.contentful.com/ubriaw6jfhm1/10TkaLheGeQG6qQGqWYqUI/5421d3108cbb699561acabd594fa2cb0/ryugj83mqwa1asojwtwb.jpg",
"height": 533,
"src": "//images.contentful.com/ubriaw6jfhm1/10TkaLheGeQG6qQGqWYqUI/5421d3108cbb699561acabd594fa2cb0/ryugj83mqwa1asojwtwb.jpg?w=400",
"srcSet": "//images.contentful.com/ubriaw6jfhm1/10TkaLheGeQG6qQGqWYqUI/5421d3108cbb699561acabd594fa2cb0/ryugj83mqwa1asojwtwb.jpg?w=400&h=533 1x,
//images.contentful.com/ubriaw6jfhm1/10TkaLheGeQG6qQGqWYqUI/5421d3108cbb699561acabd594fa2cb0/ryugj83mqwa1asojwtwb.jpg?w=600&h=800 1.5x,
//images.contentful.com/ubriaw6jfhm1/10TkaLheGeQG6qQGqWYqUI/5421d3108cbb699561acabd594fa2cb0/ryugj83mqwa1asojwtwb.jpg?w=800&h=1067 2x,
//images.contentful.com/ubriaw6jfhm1/10TkaLheGeQG6qQGqWYqUI/5421d3108cbb699561acabd594fa2cb0/ryugj83mqwa1asojwtwb.jpg?w=1200&h=1600 3x",
"width": 400,
}
`;

exports[`contentful extend node type resolveFluid filters out sizes larger than the image's width 1`] = `
Object {
"aspectRatio": 0.75,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,16 @@ describe(`contentful extend node type`, () => {
}

describe(`resolveFixed`, () => {
it(`generates responsive resolution data for images`, async () => {
it(`generates responsive resolution data for images using width option`, async () => {
const resp = await resolveFixed(image, { width: 400 })
expect(resp.srcSet.length).toBeGreaterThan(1)
expect(resp).toMatchSnapshot()
})
it(`generates responsive resolution data for images using height option`, async () => {
const resp = await resolveFixed(image, { height: 400 })
expect(resp.srcSet.length).toBeGreaterThan(1)
expect(resp).toMatchSnapshot()
})
it(`generates responsive resolution data for images using all options`, async () => {
const resp = await resolveFixed(image, {
width: 450,
Expand Down Expand Up @@ -75,15 +80,15 @@ describe(`contentful extend node type`, () => {
expect(resp.width).toBe(450)
expect(resp.height).toBe(600)
})
it(`if width and height are set that's what is returned`, async () => {
it(`returns the correct width and height when both are supplied`, async () => {
const resp = await resolveFixed(image, {
width: 450,
height: 399,
})
expect(resp.width).toBe(450)
expect(resp.height).toBe(399)
})
it(`Always outputs ints`, async () => {
it(`always outputs ints`, async () => {
const resp = await resolveFixed(image, {
width: 450.1,
height: 399.1,
Expand All @@ -105,6 +110,7 @@ describe(`contentful extend node type`, () => {
expect(resp).toMatchSnapshot()
})
})

describe(`resolveFluid`, () => {
it(`generates responsive size data for images using a default maxWidth`, async () => {
const resp = await resolveFluid(image, {})
Expand Down Expand Up @@ -145,6 +151,7 @@ describe(`contentful extend node type`, () => {
expect(resp).toMatchSnapshot()
})
})

describe(`resolveResize`, () => {
it(`generates resized images using a default width`, async () => {
const resp = await resolveResize(image, {})
Expand Down
5 changes: 5 additions & 0 deletions packages/gatsby-source-contentful/src/extend-node-type.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,11 @@ const resolveFixed = (image, options) => {
options.width = 400
}

// If only a height is given, calculate the width based on the height and the aspect ratio
if (options.height !== undefined && options.width === undefined) {
options.width = Math.round(options.height * desiredAspectRatio)
}

// If we're cropping, calculate the specified aspect ratio.
if (options.width !== undefined && options.height !== undefined) {
desiredAspectRatio = options.width / options.height
Expand Down