Skip to content

Commit b20a0f8

Browse files
committed
Adding more robust cookie consent notification modal/manager
1 parent ca0aa06 commit b20a0f8

File tree

4 files changed

+33
-28
lines changed

4 files changed

+33
-28
lines changed

docusaurus.config.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,25 @@ const config = {
107107
"@docusaurus/theme-live-codeblock",
108108
"docusaurus-plugin-image-zoom",
109109

110+
[
111+
"docusaurus-plugin-cookie-consent",
112+
{
113+
title: "Cookie Consent",
114+
description:
115+
"We use cookies to enhance your browsing experience and analyze our traffic.",
116+
links: [
117+
{ label: "Privacy Policy", href: "https://www.codat.io/privacy-policy/" },
118+
],
119+
toastMode: true,
120+
googleConsentMode: {
121+
enabled: true,
122+
waitForUpdate: 500,
123+
adsDataRedaction: true,
124+
urlPassthrough: false,
125+
},
126+
},
127+
],
128+
110129
[
111130
"docusaurus-plugin-module-alias",
112131
{

package-lock.json

Lines changed: 13 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"@stoplight/elements": "^8.4.6",
3434
"buffer": "^6.0.3",
3535
"clsx": "^2.1.1",
36+
"docusaurus-plugin-cookie-consent": "^4.1.0",
3637
"docusaurus-plugin-image-zoom": "^2.0.0",
3738
"docusaurus-plugin-module-alias": "^0.0.2",
3839
"docusaurus-plugin-sass": "^0.2.5",
@@ -43,7 +44,6 @@
4344
"prism-react-renderer": "^2.3.0",
4445
"process": "^0.11.10",
4546
"react": "^18.3.1",
46-
"react-cookie-consent": "^9.0.0",
4747
"react-diff-viewer-continued": "^3.4.0",
4848
"react-dom": "^18.3.1",
4949
"react-helmet": "^6.1.0",

src/theme/DocItem/Layout/index.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ import styles from './styles.module.css';
2121
import PageHeader from '@components/PageHeader'
2222
import Vote from './Vote';
2323

24-
import CookieConsent from "react-cookie-consent";
25-
2624
import useZendesk from './useZendesk';
2725

2826
/**
@@ -84,16 +82,6 @@ export default function DocItemLayout(props) {
8482

8583
return (
8684
<>
87-
<CookieConsent
88-
location="bottom"
89-
buttonText="Accept"
90-
cookieName="cookieConsent3"
91-
style={{ background: "#556680" }}
92-
buttonStyle={{ backgroundColor: "white", fontSize: "12px", borderRadius: "4px" }}
93-
>
94-
This website uses cookies to enhance your experience.
95-
</CookieConsent>
96-
9785
{
9886
bannerTitle
9987
&&

0 commit comments

Comments
 (0)