diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 547e81ce..a2d77a22 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -24,7 +24,7 @@ jobs: - name: "Setup node@14" uses: actions/setup-node@v2 with: - node-version: 16 + node-version: 18 - name: "Install dependencies" run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4cd23010..3ae1bd9b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,7 +26,7 @@ jobs: - name: "Setup node@14" uses: actions/setup-node@v2 with: - node-version: 16 + node-version: 18 - name: "Install dependencies" run: | diff --git a/docs/.vuepress/config.ts b/docs/.vuepress/config.ts index 16ec213a..9a260dac 100644 --- a/docs/.vuepress/config.ts +++ b/docs/.vuepress/config.ts @@ -240,6 +240,8 @@ export default { extraWatchFiles: ['.vuepress/config/**'], head: [ ['script', { src: '/hack.js', defer: "defer" }, ''], + ['script', { src: 'https://www.googletagmanager.com/gtag/js?id=G-K9FLXQ2PYF', async: "true" }, ''], + ['script', { src: '/analytics.js', async: "true" }, ''], ['link', { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }], ['link', { rel: 'apple-touch-icon', sizes: '57x57', type: 'image/x-icon', href: '/apple-icon-57x57.png' }], ['link', { rel: 'apple-touch-icon', sizes: '60x60', type: 'image/x-icon', href: '/apple-icon-60x60.png' }], diff --git a/docs/.vuepress/public/analytics.js b/docs/.vuepress/public/analytics.js new file mode 100644 index 00000000..a5e2f5df --- /dev/null +++ b/docs/.vuepress/public/analytics.js @@ -0,0 +1,5 @@ +window.dataLayer = window.dataLayer || []; +function gtag(){dataLayer.push(arguments);} +gtag('js', new Date()); + +gtag('config', 'G-K9FLXQ2PYF'); \ No newline at end of file diff --git a/package.json b/package.json index fa697fd6..82857a7f 100644 --- a/package.json +++ b/package.json @@ -43,9 +43,9 @@ ] }, "scripts": { - "docs:dev": "vuepress dev docs", - "docs:build": "vuepress build docs", - "docs:deploy": "yarn docs:build && firebase deploy", + "docs:dev": "NODE_OPTIONS=--openssl-legacy-provider vuepress dev docs", + "docs:build": "NODE_OPTIONS=--openssl-legacy-provider vuepress build docs", + "docs:deploy": "NODE_OPTIONS=--openssl-legacy-provider yarn docs:build && firebase deploy", "cspell": "cspell lint --no-summary --fail-fast --no-progress --no-must-find-files -c cspell.json docs/**/*.md ", "md:lint": "markdownlint --config .markdownlintrc ./docs/**/*.md", "md:fix": "markdownlint --fix -c .markdownlintrc ./docs/**/*.md",