Explorar el Código

docs: add plausible to docs

alvarosabu hace 2 años
padre
commit
fc08bbd408
Se han modificado 3 ficheros con 48 adiciones y 15 borrados
  1. 14 0
      docs/.vitepress/theme/index.ts
  2. 1 0
      package.json
  3. 33 15
      pnpm-lock.yaml

+ 14 - 0
docs/.vitepress/theme/index.ts

@@ -3,12 +3,24 @@ import 'uno.css'
 import DefaultTheme from 'vitepress/theme'
 import './config.css'
 import FirstScene from './components/FirstScene.vue'
+import { createPlausible } from '@huntersofbook/plausible-vue'
 
 import StackBlitzEmbed from './components/StackBlitzEmbed.vue'
 import EmbedExperiment from './components/EmbedExperiment.vue'
 
 import TresLayout from './TresLayout.vue'
 
+const plausible = createPlausible({
+  init: {
+    trackLocalhost: false,
+  },
+  settings: {
+    enableAutoOutboundTracking: true,
+    enableAutoPageviews: true,
+  },
+  partytown: false,
+})
+
 export default {
   ...DefaultTheme,
 
@@ -17,6 +29,8 @@ export default {
     ctx.app.component('FirstScene', FirstScene)
     ctx.app.component('StackBlitzEmbed', StackBlitzEmbed)
     ctx.app.component('EmbedExperiment', EmbedExperiment)
+
+    ctx.app.use(plausible)
   },
   Layout: TresLayout,
   /* Layout() {

+ 1 - 0
package.json

@@ -61,6 +61,7 @@
   },
   "devDependencies": {
     "@alvarosabu/prettier-config": "^1.2.0",
+    "@huntersofbook/plausible-vue": "^1.0.0",
     "@release-it/conventional-changelog": "^5.1.1",
     "@stackblitz/sdk": "^1.8.1",
     "@tresjs/cientos": "2.0.0-alpha.5",

+ 33 - 15
pnpm-lock.yaml

@@ -6,6 +6,7 @@ importers:
     specifiers:
       '@alvarosabu/prettier-config': ^1.2.0
       '@alvarosabu/utils': ^2.3.0
+      '@huntersofbook/plausible-vue': ^1.0.0
       '@release-it/conventional-changelog': ^5.1.1
       '@stackblitz/sdk': ^1.8.1
       '@tresjs/cientos': 2.0.0-alpha.5
@@ -36,7 +37,6 @@ importers:
       vite: ^4.1.4
       vite-plugin-banner: ^0.7.0
       vite-plugin-dts: 2.1.0
-      vite-plugin-glsl: ^1.1.2
       vite-plugin-inspect: ^0.7.16
       vite-plugin-require-transform: ^1.0.9
       vite-svg-loader: ^4.0.0
@@ -48,10 +48,11 @@ importers:
       '@vueuse/core': 9.13.0
     devDependencies:
       '@alvarosabu/prettier-config': 1.3.0_prettier@2.8.6
+      '@huntersofbook/plausible-vue': 1.0.0
       '@release-it/conventional-changelog': 5.1.1_release-it@15.9.1
       '@stackblitz/sdk': 1.8.2
-      '@tresjs/cientos': 2.0.0-alpha.5_three@0.150.1
-      '@types/three': 0.150.0
+      '@tresjs/cientos': 2.0.0-alpha.5_three@0.151.2
+      '@types/three': 0.150.1
       '@typescript-eslint/eslint-plugin': 5.56.0_cnkxirszkzb4o6ts7gbclno24e
       '@typescript-eslint/parser': 5.56.0_eslint@8.36.0
       '@vitejs/plugin-vue': 4.0.0_vite@4.1.4
@@ -71,13 +72,12 @@ importers:
       rollup-plugin-analyzer: 4.0.0
       rollup-plugin-copy: 3.4.0
       rollup-plugin-visualizer: 5.9.0
-      three: 0.150.1
+      three: 0.151.2
       unocss: 0.48.5_vite@4.1.4
       unplugin: 1.3.1
       vite: 4.1.4
       vite-plugin-banner: 0.7.0
       vite-plugin-dts: 2.1.0_vite@4.1.4
-      vite-plugin-glsl: 1.1.2_vite@4.1.4
       vite-plugin-inspect: 0.7.16_vite@4.1.4
       vite-plugin-require-transform: 1.0.9
       vite-svg-loader: 4.0.0
@@ -766,6 +766,15 @@ packages:
     resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==}
     dev: true
 
+  /@huntersofbook/plausible-vue/1.0.0:
+    resolution: {integrity: sha512-oLtbOWkidKVQWa5kfmfTD2m3xulvZucUOg6uLqZU5LNMn3GvP06bKkevOQbIlGVYuCp1KZ04T9zrDcNRbe1yrg==}
+    peerDependencies:
+      vue: ^3.2.45
+    dependencies:
+      defu: 6.1.2
+      plausible-tracker: 0.3.8
+    dev: true
+
   /@hutson/parse-repository-url/3.0.2:
     resolution: {integrity: sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q==}
     engines: {node: '>=6.9.0'}
@@ -1126,21 +1135,21 @@ packages:
     engines: {node: '>= 10'}
     dev: true
 
-  /@tresjs/cientos/2.0.0-alpha.5_three@0.150.1:
+  /@tresjs/cientos/2.0.0-alpha.5_three@0.151.2:
     resolution: {integrity: sha512-8SCxT8rIZ/5bPWLsp/T/YwqbmkoQ8OdRJfAKU2WrOVZpr01tpn6w+T6jFQDb8uFDiHatYR0PdHT7LejUi2tORw==}
     peerDependencies:
       three: latest
     dependencies:
-      '@tresjs/core': 2.0.0-alpha.1_three@0.150.1+vue@3.2.47
+      '@tresjs/core': 2.0.0-alpha.1_three@0.151.2+vue@3.2.47
       '@vueuse/core': 9.13.0_vue@3.2.47
-      three: 0.150.1
-      three-stdlib: 2.21.8_three@0.150.1
+      three: 0.151.2
+      three-stdlib: 2.21.8_three@0.151.2
       vue: 3.2.47
     transitivePeerDependencies:
       - '@vue/composition-api'
     dev: true
 
-  /@tresjs/core/2.0.0-alpha.1_three@0.150.1+vue@3.2.47:
+  /@tresjs/core/2.0.0-alpha.1_three@0.151.2+vue@3.2.47:
     resolution: {integrity: sha512-yxsVnhKmpzsvDzr35wLymHj42sK3DIN32RJHc4o2Ds1R8K6dOL/Qh7hs5QSG+Ebydi2oDSlmLp3Qv3lK+4qxHA==}
     peerDependencies:
       three: latest
@@ -1148,7 +1157,7 @@ packages:
     dependencies:
       '@alvarosabu/utils': 2.3.0
       '@vueuse/core': 9.13.0_vue@3.2.47
-      three: 0.150.1
+      three: 0.151.2
       vue: 3.2.47
     transitivePeerDependencies:
       - '@vue/composition-api'
@@ -1245,8 +1254,8 @@ packages:
       '@types/webxr': 0.5.1
     dev: true
 
-  /@types/three/0.150.0:
-    resolution: {integrity: sha512-AGhnz/pfV9lajfPMrzRyP/nySpZYfpoXdayGk0Tiwkzc6hsWOCkz/Q696Muxn9HV2EkQJ3u8g/dDt7jcP5Tecg==}
+  /@types/three/0.150.1:
+    resolution: {integrity: sha512-ZXS1M3brsfAAbTeeUEt0defPi98yWQuEyPBnvjEYY1dCEYfJnFaww0mYgRpJ9JVfmtwRxqISpVcv/g/0lMl1DQ==}
     dependencies:
       '@types/stats.js': 0.17.0
       '@types/webxr': 0.5.1
@@ -5296,6 +5305,11 @@ packages:
       pathe: 1.1.0
     dev: true
 
+  /plausible-tracker/0.3.8:
+    resolution: {integrity: sha512-lmOWYQ7s9KOUJ1R+YTOR3HrjdbxIS2Z4de0P/Jx2dQPteznJl2eX3tXxKClpvbfyGP59B5bbhW8ftN59HbbFSg==}
+    engines: {node: '>=10'}
+    dev: true
+
   /postcss-selector-parser/6.0.11:
     resolution: {integrity: sha512-zbARubNdogI9j7WY4nQJBiNqQf3sLS3wCP4WfOidu+p28LofJqDH1tcXypGrcmMHhDk2t9wGhCsYe/+szLTy1g==}
     engines: {node: '>=4'}
@@ -6164,7 +6178,7 @@ packages:
     resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==}
     dev: true
 
-  /three-stdlib/2.21.8_three@0.150.1:
+  /three-stdlib/2.21.8_three@0.151.2:
     resolution: {integrity: sha512-kqisiKvO4mSy59v5vWqBQSH8famLxp7Z51LxpMJI9GwDxqODaW02rhIwmjYDEzZWNFpjZpoDHVGbdpeHf8h3SA==}
     peerDependencies:
       three: '>=0.122.0'
@@ -6179,13 +6193,17 @@ packages:
       mmd-parser: 1.0.4
       opentype.js: 1.3.4
       potpack: 1.0.2
-      three: 0.150.1
+      three: 0.151.2
       zstddec: 0.0.2
     dev: true
 
   /three/0.150.1:
     resolution: {integrity: sha512-5C1MqKUWaHYo13BX0Q64qcdwImgnnjSOFgBscOzAo8MYCzEtqfQqorEKMcajnA3FHy1yVlIe9AmaMQ0OQracNA==}
 
+  /three/0.151.2:
+    resolution: {integrity: sha512-tGaLRP2H6++tj2JumHD25slhFAx0C619rl6G6Utjq7JTrDGJwDxpu+J2XpnYIUMfEmhNvIFDQJfp79JtKmNBWw==}
+    dev: true
+
   /through/2.3.8:
     resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==}
     dev: true