This repository was archived by the owner on Feb 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +19
-8
lines changed
packages/gatsby-plugin-manifest Expand file tree Collapse file tree 3 files changed +19
-8
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @redocly/gatsby-plugin-manifest" ,
33 "description" : " Gatsby plugin which adds a manifest.webmanifest to make sites progressive web apps" ,
4- "version" : " 3.3.0 " ,
4+ "version" : " 3.3.2 " ,
55 "author" : " Kyle Mathews <mathews.kyle@gmail.com>" ,
66 "bugs" : {
77 "url" : " https://github.com/gatsbyjs/gatsby/issues"
1313 "semver" : " ^7.3.2"
1414 },
1515 "optionalDependencies" : {
16- "sharp" : " ^0.28.0 "
16+ "sharp" : " ^0.27.2 "
1717 },
1818 "devDependencies" : {
1919 "@babel/cli" : " ^7.12.1" ,
2020 "@babel/core" : " ^7.12.3" ,
2121 "babel-preset-gatsby-package" : " ^1.3.0" ,
2222 "cross-env" : " ^7.0.3" ,
23- "sharp" : " ^0.28.0 "
23+ "sharp" : " ^0.27.2 "
2424 },
2525 "homepage" : " https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-manifest#readme" ,
2626 "keywords" : [
Original file line number Diff line number Diff line change @@ -13,14 +13,15 @@ function getSharp() {
1313 sharp = require ( `./safe-sharp` )
1414 sharp . simd ( true )
1515 }
16+
17+ // Handle Sharp's concurrency based on the Gatsby CPU count
18+ // See: http://sharp.pixelplumbing.com/en/stable/api-utility/#concurrency
19+ // See: https://www.gatsbyjs.org/docs/multi-core-builds/
20+ sharp . concurrency ( cpuCoreCount ( ) )
21+
1622 return sharp
1723}
1824
19- // Handle Sharp's concurrency based on the Gatsby CPU count
20- // See: http://sharp.pixelplumbing.com/en/stable/api-utility/#concurrency
21- // See: https://www.gatsbyjs.org/docs/multi-core-builds/
22- sharp . concurrency ( cpuCoreCount ( ) )
23-
2425async function generateIcon ( icon , srcIcon ) {
2526 const imgPath = path . join ( `public` , icon . src )
2627
Original file line number Diff line number Diff line change @@ -56,6 +56,16 @@ exports.onRenderBody = (
5656 )
5757 }
5858 }
59+ } else if ( icons . length ) {
60+ // otherwise use first icon as favicon.
61+ headComponents . push (
62+ < link
63+ key = { `gatsby-plugin-manifest-icon-link-png` }
64+ rel = "icon"
65+ href = { withPrefix ( addDigestToPath ( icons [ 0 ] . src , cacheDigest , `none` ) ) }
66+ type = "image/png"
67+ />
68+ )
5969 }
6070
6171 // Add manifest link tag.
You can’t perform that action at this time.
0 commit comments