docs: enable ga and cookie banner (#1986)

This commit is contained in:
Moritz Eckert 2023-06-30 14:42:55 +02:00 committed by GitHub
parent 54a313b247
commit 31a22bb443
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 59 additions and 27 deletions

View file

@ -22,8 +22,12 @@ async function createConfig() {
organizationName: 'Edgeless Systems', // Usually your GitHub org/user name. organizationName: 'Edgeless Systems', // Usually your GitHub org/user name.
projectName: 'Constellation', // Usually your repo name. projectName: 'Constellation', // Usually your repo name.
// plausible // scripts
scripts: [{ src: 'https://plausible.io/js/plausible.js', async: true, defer: true, 'data-domain': 'docs.edgeless.systems' }], scripts: [
{ src: 'https://plausible.io/js/plausible.js', async: true, defer: true, 'data-domain': 'docs.edgeless.systems' },
{ id: "Cookiebot", src: "https://consent.cookiebot.com/uc.js", "data-cbid": "a0cc864f-0b67-49be-8d65-9ed354de2ee6", "data-blockingmode": "auto" },
{ id: "CookieDeclaration", src: "https://consent.cookiebot.com/a0cc864f-0b67-49be-8d65-9ed354de2ee6/cd.js" }
],
// Even if you don't use internalization, you can use this field to set useful // Even if you don't use internalization, you can use this field to set useful
// metadata like html lang. For example, if your site is Chinese, you may want // metadata like html lang. For example, if your site is Chinese, you may want
@ -39,30 +43,32 @@ async function createConfig() {
/** @type {import('@docusaurus/preset-classic').Options} */ /** @type {import('@docusaurus/preset-classic').Options} */
({ ({
docs: { docs: {
remarkPlugins: [[mdxMermaid.default, { mermaid: { remarkPlugins: [[mdxMermaid.default, {
theme: 'base', mermaid: {
themeVariables: { theme: 'base',
// general themeVariables: {
'fontFamily': '"Open Sans", sans-serif', // general
'primaryColor': '#90FF99', // edgeless green 'fontFamily': '"Open Sans", sans-serif',
'primaryTextColor': '#000000', 'primaryColor': '#90FF99', // edgeless green
'secondaryColor': '#A5A5A5', // edgeless grey 'primaryTextColor': '#000000',
'secondaryTextColor': '#000000', 'secondaryColor': '#A5A5A5', // edgeless grey
'tertiaryColor': '#E7E6E6', // edgeless light grey 'secondaryTextColor': '#000000',
'tertiaryTextColor': '#000000', 'tertiaryColor': '#E7E6E6', // edgeless light grey
// flowchart 'tertiaryTextColor': '#000000',
'clusterBorder': '#A5A5A5', // flowchart
'clusterBkg': '#ffffff', 'clusterBorder': '#A5A5A5',
'edgeLabelBackground': '#ffffff', 'clusterBkg': '#ffffff',
// sequence diagram 'edgeLabelBackground': '#ffffff',
'activationBorderColor': '#000000', // sequence diagram
'actorBorder': '#A5A5A5', 'activationBorderColor': '#000000',
'actorFontFamily': '"Open Sans", sans-serif', // not released by mermaid yet 'actorBorder': '#A5A5A5',
'noteBkgColor': '#8B04DD', // edgeless purple 'actorFontFamily': '"Open Sans", sans-serif', // not released by mermaid yet
'noteTextColor': '#ffffff', 'noteBkgColor': '#8B04DD', // edgeless purple
}, 'noteTextColor': '#ffffff',
startOnLoad: true },
}}]], startOnLoad: true
}
}]],
sidebarPath: require.resolve('./sidebars.js'), sidebarPath: require.resolve('./sidebars.js'),
// sidebarPath: 'sidebars.js', // sidebarPath: 'sidebars.js',
// Please change this to your repo. // Please change this to your repo.
@ -74,6 +80,10 @@ async function createConfig() {
theme: { theme: {
customCss: require.resolve('./src/css/custom.css'), customCss: require.resolve('./src/css/custom.css'),
}, },
gtag: {
trackingID: 'G-3DVYB2CHLG',
anonymizeIP: true,
}
}), }),
], ],
], ],
@ -160,7 +170,7 @@ async function createConfig() {
items: [ items: [
{ {
label: 'Blog', label: 'Blog',
to: 'https://blog.edgeless.systems/', href: 'https://blog.edgeless.systems/',
}, },
{ {
label: 'Twitter', label: 'Twitter',
@ -177,6 +187,27 @@ async function createConfig() {
}, },
], ],
}, },
{
title: 'Company',
items: [
{
label: 'Imprint',
href: 'https://www.edgeless.systems/imprint',
},
{
label: 'Privacy Policy',
href: 'https://www.edgeless.systems/privacy',
},
{
html: `<a href="javascript: Cookiebot.renew()" class="footer__link-item">Cookie Settings</a>`
},
{
label: 'Contact Us',
href: 'https://www.edgeless.systems/contact/',
},
],
},
], ],
copyright: `Copyright © ${new Date().getFullYear()} Edgeless Systems`, copyright: `Copyright © ${new Date().getFullYear()} Edgeless Systems`,
}, },

View file

@ -17,6 +17,7 @@
"@cmfcmf/docusaurus-search-local": "^1.0.0", "@cmfcmf/docusaurus-search-local": "^1.0.0",
"@docusaurus/core": "^2.2.0", "@docusaurus/core": "^2.2.0",
"@docusaurus/module-type-aliases": "^2.2.0", "@docusaurus/module-type-aliases": "^2.2.0",
"@docusaurus/plugin-google-gtag": "^2.4.1",
"@docusaurus/preset-classic": "^2.2.0", "@docusaurus/preset-classic": "^2.2.0",
"@mdx-js/react": "^1.6.22", "@mdx-js/react": "^1.6.22",
"asciinema-player": "^3.0.1", "asciinema-player": "^3.0.1",