diff --git a/gatsby-config.js b/gatsby-config.js index 3e0d24e6..2f3207ba 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -6,7 +6,6 @@ module.exports = { }, plugins: [ 'gatsby-plugin-emotion', - 'gatsby-plugin-react-helmet', { resolve: 'gatsby-source-filesystem', options: { diff --git a/package-lock.json b/package-lock.json index 89070262..d9a7f1c8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,12 +12,10 @@ "@babel/core": "^7.26.0", "@emotion/react": "^11.13.3", "@emotion/styled": "^11.13.0", - "@types/react-helmet": "^6.1.11", "env-cmd": "^10.1.0", "gatsby": "^5.13.7", "gatsby-plugin-catch-links": "^5.13.1", "gatsby-plugin-emotion": "^8.13.1", - "gatsby-plugin-react-helmet": "^6.13.1", "gatsby-remark-autolink-headers": "^6.13.1", "gatsby-remark-external-links": "0.0.4", "gatsby-remark-prismjs": "^7.13.2", @@ -28,7 +26,6 @@ "prismjs": "^1.29.0", "react": "^18.3.1", "react-dom": "^18.3.1", - "react-helmet": "^6.1.0", "react-tweet-embed": "^2.0.0", "react-twitter-embed": "^4.0.4", "reactjs-popup": "^2.0.6", @@ -4246,14 +4243,6 @@ "csstype": "^3.0.2" } }, - "node_modules/@types/react-helmet": { - "version": "6.1.11", - "resolved": "https://registry.npmjs.org/@types/react-helmet/-/react-helmet-6.1.11.tgz", - "integrity": "sha512-0QcdGLddTERotCXo3VFlUSWO3ztraw8nZ6e3zJSgG7apwV5xt+pJUS8ewPBqT4NYB1optGLprNQzFleIY84u/g==", - "dependencies": { - "@types/react": "*" - } - }, "node_modules/@types/responselike": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.3.tgz", @@ -9658,21 +9647,6 @@ "gatsby": "^5.0.0-next" } }, - "node_modules/gatsby-plugin-react-helmet": { - "version": "6.13.1", - "resolved": "https://registry.npmjs.org/gatsby-plugin-react-helmet/-/gatsby-plugin-react-helmet-6.13.1.tgz", - "integrity": "sha512-Fwgf2UDOo1LQgw1vUmGmDMK5hXVrIXDR92URzu4DylQWgyfycfQ3D9FdU2JZ8jB6F3OI6Yx6YHC7zL3OAL7iOw==", - "dependencies": { - "@babel/runtime": "^7.20.13" - }, - "engines": { - "node": ">=18.0.0" - }, - "peerDependencies": { - "gatsby": "^5.0.0-next", - "react-helmet": "^5.1.3 || ^6.0.0" - } - }, "node_modules/gatsby-plugin-typescript": { "version": "5.13.1", "resolved": "https://registry.npmjs.org/gatsby-plugin-typescript/-/gatsby-plugin-typescript-5.13.1.tgz", @@ -15002,25 +14976,6 @@ "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.11.tgz", "integrity": "sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg==" }, - "node_modules/react-fast-compare": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.2.tgz", - "integrity": "sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ==" - }, - "node_modules/react-helmet": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/react-helmet/-/react-helmet-6.1.0.tgz", - "integrity": "sha512-4uMzEY9nlDlgxr61NL3XbKRy1hEkXmKNXhjbAIOVw5vcFrsdYbH2FEwcNyWvWinl103nXgzYNlns9ca+8kFiWw==", - "dependencies": { - "object-assign": "^4.1.1", - "prop-types": "^15.7.2", - "react-fast-compare": "^3.1.1", - "react-side-effect": "^2.1.0" - }, - "peerDependencies": { - "react": ">=16.3.0" - } - }, "node_modules/react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", @@ -15062,14 +15017,6 @@ "node": ">=0.4.0" } }, - "node_modules/react-side-effect": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/react-side-effect/-/react-side-effect-2.1.2.tgz", - "integrity": "sha512-PVjOcvVOyIILrYoyGEpDN3vmYNLdy1CajSFNt4TDsVQC5KpTijDvWVoR+/7Rz2xT978D8/ZtFceXxzsPwZEDvw==", - "peerDependencies": { - "react": "^16.3.0 || ^17.0.0 || ^18.0.0" - } - }, "node_modules/react-tweet-embed": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/react-tweet-embed/-/react-tweet-embed-2.0.0.tgz", diff --git a/package.json b/package.json index 74a448d2..e1ba5995 100644 --- a/package.json +++ b/package.json @@ -16,12 +16,10 @@ "@babel/core": "^7.26.0", "@emotion/react": "^11.13.3", "@emotion/styled": "^11.13.0", - "@types/react-helmet": "^6.1.11", "env-cmd": "^10.1.0", "gatsby": "^5.13.7", "gatsby-plugin-catch-links": "^5.13.1", "gatsby-plugin-emotion": "^8.13.1", - "gatsby-plugin-react-helmet": "^6.13.1", "gatsby-remark-autolink-headers": "^6.13.1", "gatsby-remark-external-links": "0.0.4", "gatsby-remark-prismjs": "^7.13.2", @@ -32,7 +30,6 @@ "prismjs": "^1.29.0", "react": "^18.3.1", "react-dom": "^18.3.1", - "react-helmet": "^6.1.0", "react-tweet-embed": "^2.0.0", "react-twitter-embed": "^4.0.4", "reactjs-popup": "^2.0.6", diff --git a/src/layouts/basehead.js b/src/layouts/basehead.js new file mode 100644 index 00000000..473bd473 --- /dev/null +++ b/src/layouts/basehead.js @@ -0,0 +1,26 @@ +import React from 'react' +import useSiteMetadata from '../hooks/use-site-metadata' +import AppleTouchIcon from '../resources/apple-touch-icon.png' +import Favicon from '../resources/theia-favicon.svg' +import Favicon196 from '../resources/theia-favicon-196x196.png' + +const BaseHead = ({ canonical }) => { + const { title, description } = useSiteMetadata() + return ( + <> + + {title} + + + + {canonical && } + + + + + + + ) +} + +export default BaseHead diff --git a/src/layouts/headwithschema.js b/src/layouts/headwithschema.js new file mode 100644 index 00000000..932a9dfc --- /dev/null +++ b/src/layouts/headwithschema.js @@ -0,0 +1,94 @@ +import React from 'react' +import BaseHead from './basehead' + +const HeadWithSchema = ({ canonical }) => ( + <> + + {/* JSON-LD for Theia IDE */} +