Skip to content

Commit b104ac0

Browse files
author
fabien.menager
committed
Add analytics
1 parent ba7e388 commit b104ac0

1 file changed

Lines changed: 24 additions & 14 deletions

File tree

docs/.vitepress/config.mts

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
1-
import {defineConfig} from 'vitepress'
1+
import {defineConfig} from 'vitepress';
2+
3+
const umamiScript: HeadConfig = ["script", {
4+
defer: "true",
5+
src: "https://cloud.umami.is/script.js",
6+
"data-website-id": "8bd6aedb-a830-4127-bd2c-abe704095784",
7+
}]
8+
9+
const baseHeaders: HeadConfig[] = [];
10+
11+
const headers = process.env.NODE_ENV === "production" ?
12+
[...baseHeaders, umamiScript] :
13+
baseHeaders;
214

315
// https://vitepress.dev/reference/site-config
416
export default defineConfig({
517
title: "PhenX EFCore BulkInsert",
618
description: "Super fast bulk insert for EF Core",
719
base: '/PhenX.EntityFrameworkCore.BulkInsert/',
20+
head: headers,
821
themeConfig: {
922
outline: "deep",
1023
search: {
11-
provider: 'local'
24+
provider: 'local',
1225
},
1326

1427
// https://vitepress.dev/reference/default-theme-config
@@ -20,45 +33,42 @@ export default defineConfig({
2033
sidebar: [
2134
{
2235
text: 'Getting started',
23-
items: [
24-
{text: 'Installation', link: '/getting-started#installation'},
25-
{text: 'Usage', link: '/getting-started#usage'},
26-
]
36+
link: '/getting-started#installation',
2737
},
2838
{
2939
text: 'Documentation',
30-
link: '/documentation'
40+
link: '/documentation',
3141
},
3242
{
3343
text: 'Limitations',
34-
link: '/limitations'
44+
link: '/limitations',
3545
},
3646
],
3747

3848
editLink: {
3949
pattern: 'https://github.com/PhenX/PhenX.EntityFrameworkCore.BulkInsert/edit/main/README.md/edit/main/docs/:path',
40-
text: 'Edit this page on GitHub'
50+
text: 'Edit this page on GitHub',
4151
},
4252

4353
lastUpdated: {
4454
text: 'Updated at',
4555
formatOptions: {
4656
dateStyle: 'full',
47-
timeStyle: 'medium'
48-
}
57+
timeStyle: 'medium',
58+
},
4959
},
5060

5161
socialLinks: [
5262
{
5363
icon: 'github', link: 'https://github.com/PhenX/PhenX.EntityFrameworkCore.BulkInsert',
54-
}
64+
},
5565
],
5666

5767
externalLinkIcon: true,
5868

5969
footer: {
6070
message: 'Released under the MIT License.',
61-
copyright: 'Copyright © 2025-present Fabien Ménager'
62-
}
71+
copyright: 'Copyright © 2025-present Fabien Ménager',
72+
},
6373
}
6474
})

0 commit comments

Comments
 (0)