chore: connect docs to plausible

This commit is contained in:
Neko Ayaka
2025-04-25 11:44:49 +08:00
parent 57d9b64eac
commit 5e7cb0586f
2 changed files with 18 additions and 0 deletions
+1
View File
@@ -42,6 +42,7 @@ export default defineConfig({
{ tag: 'link', attrs: { rel: 'apple-touch-icon', sizes: '180x180', href: '/apple-touch-icon.png' } },
{ tag: 'meta', attrs: { name: 'apple-mobile-web-app-title', content: 'Airi' } },
{ tag: 'link', attrs: { ref: 'manifest', href: '/site.webmanifest' } },
{ tag: 'script', attrs: { 'defer': true, 'data-domain': 'airi.moeru.ai', 'data-api': '/api/v1/page-external-data/submit', 'src': '/remote-assets/page-external-data/js/script.js' } },
],
tableOfContents: { minHeadingLevel: 2, maxHeadingLevel: 6 },
customCss: [
+17
View File
@@ -6,6 +6,23 @@ publish = "/docs/dist"
[build.environment]
NODE_VERSION = "23"
# Plausible.io analytics
#
# Proxying Plausible through Netlify | Plausible docs
# https://plausible.io/docs/proxy/guides/netlify
[[redirects]]
from = "/remote-assets/page-external-data/js/script.js"
to = "https://plausible.io/js/script.js"
status = 200
force = true
[[redirects]]
from = "/api/v1/page-external-data/submit"
to = "https://plausible.io/api/event"
status = 200
force = true
[[headers]]
for = "/site.webmanifest"