diff --git a/gatsby-ssr.tsx b/gatsby-ssr.tsx
index 79043c3b..e188d354 100644
--- a/gatsby-ssr.tsx
+++ b/gatsby-ssr.tsx
@@ -6,19 +6,20 @@ import { UMAMI_SCRIPT_URL, UMAMI_WEBSITE_ID } from './src/helpers/umami'
export const wrapPageElement: GatsbySSR['wrapPageElement'] =
wrapPageElementWithLayout
-export const onRenderBody = ({ setPostBodyComponents }) => {
+export const onRenderBody = ({ setPostBodyComponents, setHtmlAttributes }) => {
const isEnabled = process.env.NODE_ENV === 'production'
if (!isEnabled) {
return null
}
- const options = {
+ const umamiOptions = {
src: UMAMI_SCRIPT_URL,
'data-website-id': UMAMI_WEBSITE_ID
}
- return setPostBodyComponents([
-
+ setHtmlAttributes({ lang: 'en' })
+ setPostBodyComponents([
+
])
}
diff --git a/gatsby/createExif.ts b/gatsby/createExif.ts
index 8f103730..5b717894 100644
--- a/gatsby/createExif.ts
+++ b/gatsby/createExif.ts
@@ -1,13 +1,10 @@
import fs from 'fs'
-import util from 'util'
import fastExif from 'fast-exif'
import Fraction from 'fraction.js'
import getCoordinates from 'dms2dec'
import iptc from 'node-iptc'
import type { Actions, NodePluginArgs, Node } from 'gatsby'
-const readFile = util.promisify(fs.readFile)
-
export const createExif = async (
node: Node,
actions: Actions,
@@ -19,7 +16,7 @@ export const createExif = async (
if (!exifData) return
// iptc
- const file = await readFile(node.absolutePath as string)
+ const file = fs.readFileSync(node.absolutePath as string)
const iptcData = iptc(file)
createNodes(exifData, iptcData, node, actions, createNodeId)
diff --git a/gatsby/feeds.ts b/gatsby/feeds.ts
index 14dd4f93..b2566118 100644
--- a/gatsby/feeds.ts
+++ b/gatsby/feeds.ts
@@ -1,10 +1,7 @@
import fs from 'fs'
-import util from 'util'
import path from 'path'
import config from '../config'
-const writeFile = util.promisify(fs.writeFile)
-
const feedContent = (
edge: Queries.AllContentFeedQuery['allMarkdownRemark']['edges'][0]
) => {
@@ -63,14 +60,15 @@ const generateJsonFeed = async (
) => {
if (!posts) return
- await writeFile(
- path.join('./public', 'feed.json'),
- JSON.stringify(await createJsonFeed(posts)),
- 'utf8'
- ).catch((err) => {
- throw Error('\nFailed to write JSON Feed file: ', err)
- })
-
+ try {
+ fs.writeFileSync(
+ path.join('./public', 'feed.json'),
+ JSON.stringify(await createJsonFeed(posts)),
+ 'utf8'
+ )
+ } catch (error) {
+ throw Error('\nFailed to write JSON Feed file: ', error)
+ }
console.log('\nsuccess Generating JSON feed')
}
diff --git a/src/components/molecules/Menu.tsx b/src/components/molecules/Menu.tsx
index e634641f..85347e45 100644
--- a/src/components/molecules/Menu.tsx
+++ b/src/components/molecules/Menu.tsx
@@ -31,7 +31,7 @@ export default function Menu(): ReactElement {
return (
<>
-