Skip to content

Commit

Permalink
Social updates ✨ (#21)
Browse files Browse the repository at this point in the history
* Please work

* Social fixes ✨

* Testing ✨

* Revert "Testing ✨"

This reverts commit f98734d.
  • Loading branch information
PiotrRut authored Oct 6, 2020
1 parent 499aa05 commit b65f0c4
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 17 deletions.
2 changes: 1 addition & 1 deletion gatsby-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ import './src/css/prism-okaidia.css';

// This will invalidate old site cache and trigger a refresh everytime there is a new update pushed,
// meaning visitors to the site will always be presented with the most up to date content.
export const onServiceWorkerUpdateReady = () => window.location.reload();
// export const onServiceWorkerUpdateReady = () => window.location.reload();
3 changes: 1 addition & 2 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module.exports = {
url: 'https://www.prutkowski.tech',
},
plugins: [
`gatsby-plugin-react-helmet`,
{
resolve: `gatsby-plugin-google-analytics`,
options: {
Expand All @@ -26,7 +27,6 @@ module.exports = {
},
`gatsby-plugin-material-ui`,
`gatsby-plugin-eslint`,
`gatsby-plugin-react-helmet`,
{
resolve: `gatsby-plugin-manifest`,
options: {
Expand All @@ -51,7 +51,6 @@ module.exports = {
],
},
},
`gatsby-plugin-offline`,
{
resolve: 'gatsby-source-filesystem',
options: {
Expand Down
16 changes: 16 additions & 0 deletions gatsby-ssr.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
var React = require("react");

exports.onPreRenderHTML = ({ getHeadComponents, replaceHeadComponents }) => {
/**
* @type {any[]} headComponents
*/
const headComponents = getHeadComponents();

headComponents.sort((a, b) => {
if (a.props && a.props["data-react-helmet"]) {
return 0;
}
return 1;
});
replaceHeadComponents(headComponents);
};
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"gatsby-plugin-material-ui": "^2.1.10",
"gatsby-plugin-offline": "3.2.1",
"gatsby-plugin-postcss": "2.3.1",
"gatsby-plugin-react-helmet": "3.3.1",
"gatsby-plugin-react-helmet": "3.3.12",
"gatsby-plugin-sharp": "2.6.2",
"gatsby-plugin-smoothscroll": "^1.1.0",
"gatsby-remark-images": "^3.3.28",
Expand All @@ -33,7 +33,7 @@
"prop-types": "^15.7.2",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-helmet": "6.0.0",
"react-helmet": "6.1.0",
"react-icons": "^3.10.0",
"react-router-dom": "^5.2.0",
"react-scripts": "^3.4.1",
Expand Down
2 changes: 1 addition & 1 deletion src/components/seo.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const SEO = ({ title, description, image }) => {
};

return (
<Helmet title={seo.title} titleTemplate={titleTemplate}>
<Helmet title={seo.title} titleTemplate={titleTemplate} defer={false}>
<meta name="description" content={seo.description} />
<meta name="image" content={seo.image} />

Expand Down
27 changes: 16 additions & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8276,12 +8276,12 @@ [email protected]:
"@babel/runtime" "^7.9.6"
postcss-loader "^3.0.0"

[email protected].1:
version "3.3.1"
resolved "https://registry.yarnpkg.com/gatsby-plugin-react-helmet/-/gatsby-plugin-react-helmet-3.3.1.tgz#e1600bdcf575250707281a85024d10b1ee64048a"
integrity sha512-DZ/IWs+zlGL8N3JAcewPJJUPkl1st6/hIWQ3YphKoTK64DUIoMd2wWSJCrC6LiurS7knGHa4pdGyc5clwV1EKA==
[email protected].12:
version "3.3.12"
resolved "https://registry.yarnpkg.com/gatsby-plugin-react-helmet/-/gatsby-plugin-react-helmet-3.3.12.tgz#d6c2e706e3493985e8cba5ebcda7f95495792008"
integrity sha512-dRIi2RLUhO+R1OaG7TrI9k1xOPf0xDQZHx1tMIcwXEm3LWS+zwv0uX+RpyQ2lQE0L/NNhjfm253CAlcEBVN4ww==
dependencies:
"@babel/runtime" "^7.9.6"
"@babel/runtime" "^7.11.2"

[email protected]:
version "2.6.2"
Expand Down Expand Up @@ -15153,11 +15153,16 @@ react-error-overlay@^6.0.7:
resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.7.tgz#1dcfb459ab671d53f660a991513cb2f0a0553108"
integrity sha512-TAv1KJFh3RhqxNvhzxj6LeT5NWklP6rDr2a0jaTfsZ5wSZWHOGeqQyejUp3xxLfPt2UpyJEcVQB/zyPcmonNFA==

react-fast-compare@^2.0.1, react-fast-compare@^2.0.4:
react-fast-compare@^2.0.1:
version "2.0.4"
resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-2.0.4.tgz#e84b4d455b0fec113e0402c329352715196f81f9"
integrity sha512-suNP+J1VU1MWFKcyt7RtjiSWUjvidmQSlqu+eHslq+342xCbGTYmC0mEhPCOHxlW0CywylOC1u2DFAT+bv4dBw==

react-fast-compare@^3.1.1:
version "3.2.0"
resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-3.2.0.tgz#641a9da81b6a6320f270e89724fb45a0b39e43bb"
integrity sha512-rtGImPZ0YyLrscKI9xTpV8psd6I8VAtjKCzQDlzyDvqJA8XOW78TXYQwNRNd8g8JZnDu8q9Fu/1v4HPAVwVdHA==

react-focus-lock@^2.3.1:
version "2.4.1"
resolved "https://registry.yarnpkg.com/react-focus-lock/-/react-focus-lock-2.4.1.tgz#e842cc93da736b5c5d331799012544295cbcee4f"
Expand All @@ -15170,14 +15175,14 @@ react-focus-lock@^2.3.1:
use-callback-ref "^1.2.1"
use-sidecar "^1.0.1"

react-helmet@6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/react-helmet/-/react-helmet-6.0.0.tgz#fcb93ebaca3ba562a686eb2f1f9d46093d83b5f8"
integrity sha512-My6S4sa0uHN/IuVUn0HFmasW5xj9clTkB9qmMngscVycQ5vVG51Qp44BEvLJ4lixupTwDlU9qX1/sCrMN4AEPg==
react-helmet@6.1.0:
version "6.1.0"
resolved "https://registry.yarnpkg.com/react-helmet/-/react-helmet-6.1.0.tgz#a750d5165cb13cf213e44747502652e794468726"
integrity sha512-4uMzEY9nlDlgxr61NL3XbKRy1hEkXmKNXhjbAIOVw5vcFrsdYbH2FEwcNyWvWinl103nXgzYNlns9ca+8kFiWw==
dependencies:
object-assign "^4.1.1"
prop-types "^15.7.2"
react-fast-compare "^2.0.4"
react-fast-compare "^3.1.1"
react-side-effect "^2.1.0"

react-hot-loader@^4.12.21:
Expand Down

0 comments on commit b65f0c4

Please sign in to comment.