File tree 3 files changed +20
-3
lines changed
3 files changed +20
-3
lines changed Original file line number Diff line number Diff line change
1
+ import { yandexMetrika } from '@hywax/vitepress-yandex-metrika'
1
2
import type { Theme } from 'vitepress'
2
3
import DefaultTheme from 'vitepress/theme'
3
4
import './custom.css'
4
5
import PreviewService from '../components/preview-service.vue'
5
6
6
7
export default {
7
8
extends : DefaultTheme ,
8
- enhanceApp ( { app } ) {
9
- app . component ( 'PreviewService' , PreviewService )
9
+ enhanceApp ( ctx ) {
10
+ ctx . app . component ( 'PreviewService' , PreviewService )
11
+
12
+ yandexMetrika ( ctx , {
13
+ enabled : import . meta. env . MODE === 'production' ,
14
+ counter : {
15
+ id : 96086220 ,
16
+ initParams : {
17
+ trustedDomains : [ 'mafl.hywax.space' ] ,
18
+ } ,
19
+ } ,
20
+ } )
10
21
} ,
11
22
} satisfies Theme
Original file line number Diff line number Diff line change 29
29
"@antfu/eslint-config" : " ^2.6.1" ,
30
30
"@commitlint/cli" : " ^18.4.3" ,
31
31
"@commitlint/config-conventional" : " ^18.4.3" ,
32
+ "@hywax/vitepress-yandex-metrika" : " ^0.2.0" ,
32
33
"@nuxt/devtools" : " latest" ,
33
34
"@nuxtjs/color-mode" : " ^3.3.2" ,
34
35
"@nuxtjs/i18n" : " ^8.0.0" ,
51
52
"lint-staged" : {
52
53
"*.ts" : " yarn run lint"
53
54
}
54
- }
55
+ }
Original file line number Diff line number Diff line change 1601
1601
resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz#e5211452df060fa8522b55c7b3c0c4d1981cb044"
1602
1602
integrity sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==
1603
1603
1604
+ " @hywax/vitepress-yandex-metrika@^0.2.0 " :
1605
+ version "0.2.0"
1606
+ resolved "https://registry.yarnpkg.com/@hywax/vitepress-yandex-metrika/-/vitepress-yandex-metrika-0.2.0.tgz#165f0c1e2ffebbfb2ee952b074db71c4bd59275c"
1607
+ integrity sha512-Z8NSsYssCXrELLUB6ZnG4miMUdE+zB/zXLPpH0/FdZyl245T8o3nzmLcQm9e1Aja3lVD10/OAUjd7LCK3NyPWA==
1608
+
1604
1609
" @iconify/collections@^1.0.374 " :
1605
1610
version "1.0.375"
1606
1611
resolved "https://registry.yarnpkg.com/@iconify/collections/-/collections-1.0.375.tgz#e75d4f84ba7c94c7300cf946de2d4372a0b7734c"
You can’t perform that action at this time.
0 commit comments