1
0
mirror of https://github.com/tabler/tabler.git synced 2025-12-21 17:34:25 +04:00

feat: add Plausible analytics integration and configure Vercel rewrites

This commit is contained in:
codecalm
2025-04-21 20:08:10 +02:00
parent 67f3571a4f
commit 8da9fa869f
2 changed files with 20 additions and 0 deletions

18
docs/vercel.json Normal file
View File

@@ -0,0 +1,18 @@
{
"buildCommand": "pnpm run build",
"devCommand": "pnpm run dev",
"rewrites": [
{
"source": "/stats/js/script.js",
"destination": "https://plausible.io/js/script.js"
},
{
"source": "/stats/api/event",
"destination": "https://plausible.io/api/event"
},
{
"source": "/(.*)",
"destination": "/error-404.html"
}
]
}

View File

@@ -6,6 +6,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tabler Documentation - {{ title }}</title>
<script defer data-api="/stats/api/event" data-domain="docs.tabler.io" src="/stats/js/script.js"></script>
<link rel="stylesheet" href="/dist/css/tabler{% if environment != 'development' %}.min{% endif %}.css{% if environment != 'development' %}?{{ 'now' | date: '%s' }}{% endif %}" />
{% for plugin in site.cssPlugins %}
<link