Skip to content

Commit 2eadfd5

Browse files
authored
Merge pull request #1715 from mcclowes/feat/cookie-consent
Adding more robust cookie consent notification modal/manager
2 parents 1be572b + b20a0f8 commit 2eadfd5

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
@@ -36,6 +36,7 @@
3636
"@stoplight/elements": "^8.4.6",
3737
"buffer": "^6.0.3",
3838
"clsx": "^2.1.1",
39+
"docusaurus-plugin-cookie-consent": "^4.1.0",
3940
"docusaurus-plugin-image-zoom": "^2.0.0",
4041
"docusaurus-plugin-module-alias": "^0.0.2",
4142
"docusaurus-plugin-sass": "^0.2.5",
@@ -46,7 +47,6 @@
4647
"prism-react-renderer": "^2.3.0",
4748
"process": "^0.11.10",
4849
"react": "^18.3.1",
49-
"react-cookie-consent": "^9.0.0",
5050
"react-diff-viewer-continued": "^3.4.0",
5151
"react-dom": "^18.3.1",
5252
"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)