Skip to content

Commit

Permalink
feat(website): add accessibility link, update common js (#3155)
Browse files Browse the repository at this point in the history
* feat(footer): add accessibility link

* fix(cookies): remove defer from script

* fix(common): move to post body components

* fix(common): remove defer

* fix(common): unique name

* fix(common): re-add defer

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
tay1orjones and kodiakhq[bot] authored Sep 16, 2022
1 parent a6bf633 commit 6b5e381
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions gatsby-ssr.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';

export const onRenderBody = ({ setHeadComponents }) => {
export const onRenderBody = ({ setHeadComponents, setPostBodyComponents }) => {
const script = `
if(!window) window = {};
window.idaPageIsSPA = true;
Expand All @@ -20,7 +20,7 @@ export const onRenderBody = ({ setHeadComponents }) => {
},
}`;

return setHeadComponents([
setHeadComponents([
<meta key="image" name="image" content={'/ogimage.png'} />,
<meta
key="og:url"
Expand Down Expand Up @@ -68,6 +68,9 @@ export const onRenderBody = ({ setHeadComponents }) => {
key="fathom"
defer
/>,
]);

setPostBodyComponents([
<script key="digital-data" dangerouslySetInnerHTML={{ __html: script }} />,
<script
defer
Expand Down
1 change: 1 addition & 0 deletions src/gatsby-theme-carbon/components/Footer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const links = {
},
{ href: 'https://www.ibm.com/privacy', linkText: 'Privacy' },
{ href: 'https://www.ibm.com/legal', linkText: 'Terms of use' },
{ href: 'https://www.ibm.com/able', linkText: 'Accessibility' },
{ href: 'https://www.ibm.com/', linkText: 'IBM.com' },
],
secondCol: [
Expand Down

1 comment on commit 6b5e381

@vercel
Copy link

@vercel vercel bot commented on 6b5e381 Sep 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.