diff --git a/pwa/gatsby-browser.js b/pwa/gatsby-browser.js index 22ea075e..50a196ed 100644 --- a/pwa/gatsby-browser.js +++ b/pwa/gatsby-browser.js @@ -23,3 +23,8 @@ export const wrapRootElement = ({ element }) => { ); }; + +export const onRenderBody = ({ setHeadComponents }) => { + const HeadComponents = [Woo Website Template]; + setHeadComponents(HeadComponents); +}; diff --git a/pwa/gatsby-config.js b/pwa/gatsby-config.js index e2400e18..38075dcf 100644 --- a/pwa/gatsby-config.js +++ b/pwa/gatsby-config.js @@ -40,5 +40,11 @@ module.exports = { ], }, }, + { + resolve: "gatsby-plugin-html-attributes", + options: { + lang: "nl-NL", + }, + }, ], }; diff --git a/pwa/gatsby-ssr.js b/pwa/gatsby-ssr.js index 22ea075e..50a196ed 100644 --- a/pwa/gatsby-ssr.js +++ b/pwa/gatsby-ssr.js @@ -23,3 +23,8 @@ export const wrapRootElement = ({ element }) => { ); }; + +export const onRenderBody = ({ setHeadComponents }) => { + const HeadComponents = [Woo Website Template]; + setHeadComponents(HeadComponents); +}; diff --git a/pwa/package-lock.json b/pwa/package-lock.json index ff0ccd7c..42ed944a 100644 --- a/pwa/package-lock.json +++ b/pwa/package-lock.json @@ -53,6 +53,7 @@ "dedent": "^1.5.1", "gatsby": "^5.13.3", "gatsby-plugin-breadcrumb": "^12.3.2", + "gatsby-plugin-html-attributes": "^1.0.5", "gatsby-plugin-layout": "^4.13.1", "html-react-parser": "^5.1.1", "i18next": "^23.7.19", @@ -5806,6 +5807,27 @@ "core-js": "^3.0.0" } }, + "node_modules/babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==", + "dependencies": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + } + }, + "node_modules/babel-runtime/node_modules/core-js": { + "version": "2.6.12", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", + "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", + "deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.", + "hasInstallScript": true + }, + "node_modules/babel-runtime/node_modules/regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" + }, "node_modules/balanced-match": { "version": "1.0.2", "license": "MIT" @@ -9440,6 +9462,14 @@ "gatsby": "3.x - 5.x" } }, + "node_modules/gatsby-plugin-html-attributes": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/gatsby-plugin-html-attributes/-/gatsby-plugin-html-attributes-1.0.5.tgz", + "integrity": "sha512-5u9AHfwxYuhl/QT+cI/r0+1oCKba/LPB6PHUaJN65swPOPrsAiNAj++hTSCs3CG3fITcR8Oorcn6hm6rN+uVAg==", + "dependencies": { + "babel-runtime": "^6.26.0" + } + }, "node_modules/gatsby-plugin-layout": { "version": "4.13.1", "resolved": "https://registry.npmjs.org/gatsby-plugin-layout/-/gatsby-plugin-layout-4.13.1.tgz", diff --git a/pwa/package.json b/pwa/package.json index f1f45f1f..4ebc2f05 100644 --- a/pwa/package.json +++ b/pwa/package.json @@ -4,7 +4,9 @@ "private": true, "description": "Product Website Template", "author": "Conduction", - "keywords": ["gatsby"], + "keywords": [ + "gatsby" + ], "scripts": { "develop": "gatsby develop", "start": "gatsby develop", @@ -68,6 +70,7 @@ "dedent": "^1.5.1", "gatsby": "^5.13.3", "gatsby-plugin-breadcrumb": "^12.3.2", + "gatsby-plugin-html-attributes": "^1.0.5", "gatsby-plugin-layout": "^4.13.1", "html-react-parser": "^5.1.1", "i18next": "^23.7.19", diff --git a/pwa/src/layout/Layout.tsx b/pwa/src/layout/Layout.tsx index 34544427..a2f30d33 100644 --- a/pwa/src/layout/Layout.tsx +++ b/pwa/src/layout/Layout.tsx @@ -14,6 +14,7 @@ import { far } from "@fortawesome/free-regular-svg-icons"; import { IconPack, library } from "@fortawesome/fontawesome-svg-core"; import { useEnvironment } from "../hooks/useEnvironment"; import { ToolTip } from "@conduction/components"; +import { Helmet } from "react-helmet"; export const TOOLTIP_ID = "cb8f47c3-7151-4a46-954d-784a531b01e6";